Hello,
I'm having a slight issue with the check_kvm plugin. I created a new command in Nagios called check_kvm and in the command line I put the following line;
$USER1$/check_kvm
Then in services I created a new service for check_kvm and when I use the Test command button I get the following output;
COMMAND: /usr/local/nagios/libexec/check_kvm
OUTPUT: Unknown guests
When I go to the server and run the command locally as root it displays properly. So I tried running the command locally as nagios user and I do get the same output 'unknown guests' but if I run the command as nagios again but this time like;
sudo /usr/local/nagios/libexec/check_kvm it displays properly.
Since this is my first try at this, I'm wondering if I'm doing something wrong in the interface when creating the command or am I defining the service wrong?
--Berto
CHECK_KVM Plugin
Re: CHECK_KVM Plugin
Some plugins may need to run as root to function and when they are run from Nagios XI, they are ran as the nagios user so that is why you are receiving the error.
You could define your command like below
But I found this on the exchange site which could work for you also.
You could define your command like below
Code: Select all
sudo $USER1$/check_kvmNo sudo is necessary if you simply add nagios user to the libvirt group
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: CHECK_KVM Plugin
I will give both a try and let you know if one of those fixed my issue.
Re: CHECK_KVM Plugin
Keep us in the loop.
Be sure to check out our Knowledgebase for helpful articles and solutions!