Hi guys,
Sorry for bothering you with my first post in this forum. I’m not able to add a simple command to the director and ask you for some help or a hint. I want to add check_dnf from https://github.com/nikkolasg/check_dnf. I put check_dnf.rb into /usr/lib64/nagios/plugins/ on an agent, made a chmod 755 and run the check on the command line:
[root@pxxxx plugins]# sudo -H -u nagios /usr/lib64/nagios/plugins/check_dnf.rb
OK - No updates to do on this host.
So far so good. Now I’m going to the director and unfortunately check_dnf is not available as an “External Command” so I add a “Plug In Check Command”:
with this result:
zones.d/director-global/commands.conf:
object CheckCommand "dnf" {
import "plugin-check-command"
command = [ "/usr/lib64/nagios/plugins/check_dnf.rb" ]
timeout = 3m
}
After deploying it I create a “Service Template”:
with this result:
zones.d/director-global/service_templates.conf:
template Service "dnf-check" {
check_command = "dnf"
enable_notifications = true
enable_active_checks = true
enable_passive_checks = true
command_endpoint = host_name
}
and after deploying this template I add the service to a host and this is the result after checking:
Does this check try to run dnf instead of check_dnf.rb?
Under
## Check execution
The Command shows:[...]dnf [Process check result]("https://icinga2/icingaweb2/monitoring/service/process-check-result?host=pxxxx&service=dnf-check")
All the other checks (they are all from “External Commands”) are running smoothly (users-check, disk-check, load check and so on).
What do I missing? Thanks in advance for any help or hint!