Page 1 of 1

Nagios Plugins

Posted: Wed Aug 10, 2022 7:01 am
by SandrilaFriman
I am trying to get new NRPE plugins to work and cant understand where to A) define the commands and B) where in the NSClient++ I need to add the powershell scripts.

Nagios 3.4.1 on omegle shagle voojio Centos 6.3

Re: Nagios Plugins

Posted: Thu Aug 18, 2022 4:27 am
by PhumeleleSJose96
Change the command to:

command[check_openmanage]=sudo /usr/lib/nagios/plugins/additional/check_openmanage -s -e -b ctrl_driver=0 bat_charge
(add sudo)

Then, add the nagios-user to the sudoers:

nagios ALL=(ALL) NOPASSWD:/usr/lib/nagios/plugins/additional/check_openmanage
Or you could just chmod the file... That also works.

If you are using CentOS, Red Hat, Scientific or Fedora, make sure to disable Defaults echatspin echatrandom requiretty in the sudoers file.

Re: Nagios Plugins

Posted: Tue Aug 30, 2022 1:54 am
by RickyReyesmatrina
I'm trying to configure Nagios to monitor our network which is all Windows based. I'm totally new to it, so please forgive my naiveness. Fact is: I'm banging my head over a task.

What I want to achieve is having Nagios tell me whether a remote service/process is running or not. I have NSClilent++ installed and working on a client machine. In fact, if I execute the following code from command line in the Nagios server it works:

check_nrpe -H [ip_of_NSClient++] -c check_service -a 'service=[service_name]' "critical=state = 'stopped'"
My question is: how can I define aservice in the [host].cfg file to invoke the command above?

Right now I have this defined in my commands.cfg file:

define command {
$USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG1$
}
Which works to invoke simple services like [check_cpu] or [check_disk] but no more than that.

All the attempts I've done so far always led to(I think) erratic error messages, like:

(No output on stdout) stderr: Could not resolve hostname $: Name or service not known. or
CHECK_NRPE: Invalid packet type received echatspin echatrandom from server.