Hide Forgot
Tang should support the Nagios engine for event recording. This functionality (tang-nagious) is available upstream (and Fedora) and needs to be productized. https://www.mankier.com/1/tang-nagios
Testing instructions: $ dnf -y install tang tang-nagios ... $ systemctl start tangd.socket ... $ /usr/lib64/nagios/plugins/tang -u http://localhost OK|adv=27611 exc=46064 nkeys=2 nsigk=1 nexck=1 $ echo $? 0 This should output data according to this API: https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/pluginapi.html The specific data points we return are defined in the tang-nagios man page. You can also test for the failure case: $ sudo systemctl stop tangd.socket ... $ /usr/lib64/nagios/plugins/tang -u http://localhost Unable to connect to server! $ echo $? 2 Full testing would involve actually setting up a nagios instance and attempting to use the plugin. I have not done this, but others have.
Note that all other nagios plugins (RPMS) in EPEL and the non-tang one in RHEL are named like "nagios-plugins-$name", not "$name-nagios".
Some more detailed notes how to properly test this: 1) install nagios and ie. nagios-plugins-all RPMs from EPEL 2) set selinux to permissive (or write policy module for nagios) 3) enable and start httpd and nagios services 4) htpasswd -c /etc/nagios/passwd nagiosadmin; enter some password 5) login via web browser on http://hostname/nagios, you should see "Daemon running with PID ..." 6) install tang and tang-nagios 7) edit /usr/lib/systemd/system/tangd.socket, change port to ie. 81 8) rm -rf /var/db/tang/* /var/cache/tang/* 9) /usr/libexec/tangd-keygen /var/db/tang 10) /usr/libexec/tangd-update /var/db/tang /var/cache/tang 11) /usr/lib64/nagios/plugins/tang -u http://localhost:81; should return OK 12) edit /etc/nagios/objects/commands.cfg, add 'define command', see below 13) edit /etc/nagios/objects/localhost.cfg, add 'define service', see below 14) restart the nagios service 15) refresh nagios web ui, see Tang in localhost services list 16) wait a few minutes for PENDING to become OK define command{ command_name check_tang command_line /usr/lib64/nagios/plugins/tang -u $ARG1$ } define service{ use local-service host_name localhost service_description Tang check_command check_tang!http://localhost:81 notifications_enabled 0 } From there on, testing other cases (missing keys, tangd not enabled, etc.) is possible.
(In reply to Jiri Jaburek from comment #2) > Note that all other nagios plugins (RPMS) in EPEL and the non-tang one in > RHEL are named like "nagios-plugins-$name", not "$name-nagios". I'm aware of this. When I last checked, all of the "nagios-plugins-$name" packages were subpackages of nagios. We can rename the package if we think it is important. Let me know what your opinion is.
(In reply to Nathaniel McCallum from comment #4) > (In reply to Jiri Jaburek from comment #2) > > Note that all other nagios plugins (RPMS) in EPEL and the non-tang one in > > RHEL are named like "nagios-plugins-$name", not "$name-nagios". > > I'm aware of this. When I last checked, all of the "nagios-plugins-$name" > packages were subpackages of nagios. We can rename the package if we think > it is important. Let me know what your opinion is. Since we already have one other nagios plugin in RHEL (optional channel): Name : nagios-plugins-bacula Arch : x86_64 Version : 5.2.13 Release : 23.1.el7 Size : 26 k Repo : rhel-ks-opt Summary : Nagios Plugin - check_bacula URL : http://www.bacula.org License : AGPLv3 with exceptions Description : Provides check_bacula support for Nagios. I'd suggest we follow the naming scheme.