HewlettPackard / nagios-plugins-hpilo

Nagios plug-in for iLO Agentless Management
Other
27 stars 11 forks source link

Performance issues (all 8 vCPUs load 100% during iLO checks) #12

Closed 0x412e4e closed 3 years ago

0x412e4e commented 3 years ago

Hello everyone,

Is anybody else noticing performance issues on their Nagios Core server when running the iLO checks against multiple hosts?

I have five HPE iLO cards which I'm checking, and every single time the checks run I can see in htop that the virtual machine's CPU's are at full load, despite having eight virtual cores:

htop

The command in question (_grep -r commandfile) is something the nagios-hpilo plugin does, as the line can be found in the plugin's code.

0x412e4e commented 3 years ago

Hello,

I believe I've figured out the issue. A plugin called nagios_hpeilo_traps contains a function which searches for the Nagios command file (nagios.cmd) and it uses the command grep -r command_file which is for some reason very resource intensive.

Here is a snippet of the function:

NagiosCmdFile=`grep -r command_file $nagios_cfg_file | \
                awk -F = '{print $2}'`

And I've replace it with a full path to the command file like this:

NagiosCmdFile="/usr/local/nagios/var/rw/nagios.cmd"

This has completely resolved the issue for me, I'm no longer getting timeouts and nothing is hogging my server's CPU resources!

This thread can be closed.

0x412e4e commented 3 years ago

Closing!