Start FPROBE as a Linux Service

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Post Reply
sylvainouellet
Posts: 1
Joined: Wed Jan 16, 2019 8:34 am

Start FPROBE as a Linux Service

Post by sylvainouellet »

Hi,
I would like to know if somebody was able to start fprobe as a Linux service?
I'm running fprobe v1.1 on a RHEL8.6 VM.

My fprobe.service file:
[Unit]
Description=Fprobe service for Nagios Network Analyzer
Wants=network.target

[Service]
Type=simple
ExecStart=/usr/local/sbin/fprobe -i ens192 10.1.0.156:9900 -u root -v 7


I also tried to call a shell script from the fprobe.service instead, and it doesn't work at all.

Output:
[root@lnx86ABAPtemplate ~]# systemctl status fprobe.service
● fprobe.service - Fprobe service for Nagios Network Analyzer
Loaded: loaded (/etc/systemd/system/fprobe.service; static; vendor preset: disabled)
Active: inactive (dead)

Jan 05 14:46:43 lnx86ABAPtemplate systemd[1]: Started Fprobe service for Nagios Network Analyzer.
Jan 05 14:46:43 lnx86ABAPtemplate systemd[1]: fprobe.service: Succeeded.


Anaybody was able to configure the service?

Thanks,
S
ssunga
Posts: 32
Joined: Wed Aug 09, 2023 10:38 am

Re: Start FPROBE as a Linux Service

Post by ssunga »

Thanks for reaching out @sylvainouellet!

It seems like your fprobe service starts but then immediately exits, leading to the inactive (dead) status. This can occur if the program is not designed to run as a daemon or if there's an issue with the startup command.

First, make sure fprobe can run in the foreground without requiring any interaction. Test this by executing the ExecStart command directly in your terminal.

The -u root part in your ExecStart may not be necessary, as systemd services run as root by default. You could try removing it.

Additionally, check if fprobe requires specific privileges and include them using directives like CapabilityBoundingSet. For services that should stay up, setting Restart=on-failure may help.

Here is an updated service file to try:

Code: Select all

[Unit]
Description=Fprobe service for Nagios Network Analyzer
Wants=network.target
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/sbin/fprobe -i ens192 10.1.0.156:9900 -v 7
Restart=on-failure
User=root
CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN

[Install]
WantedBy=multi-user.target
After updating, reload the daemon with systemctl daemon-reload and start the service again using systemctl start fprobe.service.

If there are still issues, use journalctl -u fprobe.service to check the logs for more detailed error information.

Keep us updated on your situation, and don't hesitate to post any further questions.
Post Reply