Plugin Issue with check_kvm
Posted: Sun Oct 16, 2016 11:05 am
Hello,
I've noticed that the plugin check_kvm that I'm using is all of sudden displaying "Unknown guests" for the results. If I run /usr/local/nagios/libexec/check_nrpe -H localhost -c check_kvm as root or as the nagios user, I get the same results back from the command line. I'm pretty much the only person in my team that configures Nagios Xi, so not sure what has happen for this to stop working. My /etc/sudoers for nagios user looks like this:
# NEEDED TO ALLOW NAGIOS TO CHECK SERVICE STATUS
Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/check_kvm
# ASTERISK-SPECIFIC CHECKS
# NOTE: You can uncomment the following line if you are monitoring Asterisk locally
#nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_asterisk_sip_peers.sh, /usr/local/nagios/libexec/nagisk.pl, /usr/sbin/asterisk
/etc/passwd shows:
nagios
59658:59658::/home/nagios:/bin/bash
/etc/group shows:
nagios
59658:nagios
nagcmd
501:nagios
/etc/nsswitch.conf shows for sudoers:
sudoers: files ldap
The plugin did mention to avoid using sudoers I can add the nagios users to the libvirt group, but trying that didn't help.
--Berto
I've noticed that the plugin check_kvm that I'm using is all of sudden displaying "Unknown guests" for the results. If I run /usr/local/nagios/libexec/check_nrpe -H localhost -c check_kvm as root or as the nagios user, I get the same results back from the command line. I'm pretty much the only person in my team that configures Nagios Xi, so not sure what has happen for this to stop working. My /etc/sudoers for nagios user looks like this:
# NEEDED TO ALLOW NAGIOS TO CHECK SERVICE STATUS
Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/check_kvm
# ASTERISK-SPECIFIC CHECKS
# NOTE: You can uncomment the following line if you are monitoring Asterisk locally
#nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_asterisk_sip_peers.sh, /usr/local/nagios/libexec/nagisk.pl, /usr/sbin/asterisk
/etc/passwd shows:
nagios
/etc/group shows:
nagios
nagcmd
/etc/nsswitch.conf shows for sudoers:
sudoers: files ldap
The plugin did mention to avoid using sudoers I can add the nagios users to the libvirt group, but trying that didn't help.
--Berto