Add systemd service information.
This commit is contained in:
parent
68f37c6fd7
commit
272b2aa375
10
doc/hmci.service
Normal file
10
doc/hmci.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=HMC Insights Service
|
||||
|
||||
[Service]
|
||||
TimeoutStartSec=0
|
||||
Restart=always
|
||||
ExecStart=/opt/hmci/bin/hmci
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
4
doc/service.txt
Normal file
4
doc/service.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
To setup as a systemd service, copy the hmci.service
|
||||
file into /etc/systemd/system/ and enable the service:
|
||||
|
||||
systemctl enable hmci.service
|
|
@ -105,11 +105,11 @@ class InfluxClient {
|
|||
synchronized void writeBatchPoints() throws Exception {
|
||||
log.debug("writeBatchPoints()");
|
||||
try {
|
||||
influxDB.write(batchPoints);
|
||||
influxDB.writeWithRetry(batchPoints);
|
||||
} catch(Exception e) {
|
||||
log.error("writeBatchPoints() error - " + e.getMessage(), e);
|
||||
if(++errorCounter > 3) {
|
||||
log.info("writeBatchPoints() trying to logout / login");
|
||||
log.error("writeBatchPoints() error - " + e.getMessage());
|
||||
if(++errorCounter > 5) {
|
||||
log.info("writeBatchPoints() forcing logout / login");
|
||||
errorCounter = 0;
|
||||
logoff();
|
||||
login();
|
||||
|
|
Loading…
Reference in a new issue