I’m having issues trying to use the check_service plugin passing invalid args from the GUI. All nagios plugins are installed and validated working in my libre install. Validation of testing the script:
[[email protected] plugins]# ./check_service.sh -s oxidized
Active: active (running) since Wed 2019-04-17 12:39:41 MDT; 1 day 1h ago
However after creating the service in the GUI and passing args, libre is inserting an invalid argument --H into the string…
[[email protected] librenms]# ./check-services.php -d
Starting service polling run:
SQL[SELECT D.,S.,attrib_value FROM
devices AS D INNER JOIN
services AS S ON S.device_id = D.device_id AND D.disabled = 0 LEFT JOIN
devices_attribs as A ON D.device_id = A.device_id AND A.attrib_type = “override_icmp_disable” ORDER by D.device_id DESC;  0.77ms]
Nagios Service - 7
Request: ‘/usr/lib64/nagios/plugins/check_service.sh’ ‘-H’ ‘10.80.1.160’ ‘-s’ ‘oxidized’
/usr/lib64/nagios/plugins/check_service.sh: illegal option – H
Perf Data - None.
./check-services.php 2019-04-18 14:03:54 - 1 services polled in 0.008 secs
I’m honestly not sure what is wrong here. The way I understand it, this plugin SHOULD be able to target remote servers, however if i cannot pass it any arguments specifying this, I’m kinda stumped. Script output from the help file is below, if anyone has input I’d appreciate it greatly.
[[email protected] plugins]# ./check_service.sh -h
Check status of system services for Linux, FreeBSD, OSX, and AIX.
Options: -s <service> Specify service name -l List services -o <os> OS type, "linux/osx/freebsd/aix" -u <user> User if you need to sudo -u'' for launchctl (def: nagios, linux and osx only) -t <tool> Manually specify service management tool (def: autodetect) with status and service e.g. -t "service nagios status"''