Systemd
Install OpenObserve as a system service use systemd.
Create env file
/etc/openobserve.env
ZO_ROOT_USER_EMAIL = "example@example.com"
ZO_ROOT_USER_PASSWORD = "<YOUR_PASSWORD>"
ZO_DATA_DIR = "/data/openobserve"Replace <YOUR_PASSWORD> with a password of your own.
Create systemd service file
/usr/lib/systemd/system/openobserve.service
[Unit]
Description=The OpenObserve server
After=syslog.target network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
Type=simple
LimitNOFILE=65535
EnvironmentFile=/etc/openobserve.env
ExecStart=/usr/local/bin/openobserve
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.targetTips:
EnvironmentFileandExecStartshould be the config file and openobserve binary path.
Enable service
After create env file and service file, you can reload systemed and enable OpenObserve service:
systemctl daemon-reload
systemctl enable openobserveThen, you can use systemctl control OpenObserve as a system service.
Start OpenObserve
systemctl start openobserveStop OpenObserve
systemctl stop openobserveStatus of OpenObserve
systemctl status openobserveTest service
curl -v http://localhost:5080/healthzYou will see:
{"status":"ok"}Was this page helpful?