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 {
|
synchronized void writeBatchPoints() throws Exception {
|
||||||
log.debug("writeBatchPoints()");
|
log.debug("writeBatchPoints()");
|
||||||
try {
|
try {
|
||||||
influxDB.write(batchPoints);
|
influxDB.writeWithRetry(batchPoints);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
log.error("writeBatchPoints() error - " + e.getMessage(), e);
|
log.error("writeBatchPoints() error - " + e.getMessage());
|
||||||
if(++errorCounter > 3) {
|
if(++errorCounter > 5) {
|
||||||
log.info("writeBatchPoints() trying to logout / login");
|
log.info("writeBatchPoints() forcing logout / login");
|
||||||
errorCounter = 0;
|
errorCounter = 0;
|
||||||
logoff();
|
logoff();
|
||||||
login();
|
login();
|
||||||
|
|
Loading…
Reference in a new issue