Hi - I've got a a lot of Passive checks coming into NagiosXI and just wanted to check that I had enough Buffer slots.
Appears that this monitor no longer works ?
# /usr/local/nagios/libexec/check_nagios_performance.php ucb
OK - Current command buffer usage:USEDCMDBUF | Command_buffer_usage=USEDCMDBUF;;;
# /usr/local/nagios/libexec/check_nagios_performance.php hcb
OK - High command buffer usage:HIGHCMDBUF | High_command_buffer_usage=HIGHCMDBUF;;;
I checked the other metrics that we monitor with check_nagios_performance and it appears that it is only these two that are broken.
Also what is the default value for command_check_interval ? My entry is commented out in the nagios.cfg file, so I'm assuming that it has a default value.
/*** as is external_command_buffer_slots */
else if(!strcmp(variable, "external_command_buffer_slots"))
obsoleted_warning(variable, "All commands are always processed upon arrival");
Fred Kroeger wrote:Also what is the default value for command_check_interval ? My entry is commented out in the nagios.cfg file, so I'm assuming that it has a default value.
I think the default value is "process all the commands all the time". Adding any sort of positive value would simply stagger the execution of those external commands. That can be handy if your system often gets massive influxes of commands to process.
Thanks for the info - I'll remove those monitors then.
So what constitutes "massive influxes of commands"? I have two Nagios Instances sending events to this one via Outbound transfers. Approx 425 hosts & 4700 services.
Is there some way of measuring how many external commands are being processed and if I do change the command_check_interval value that I'm not getting a backlog ?
Fred Kroeger wrote:So what constitutes "massive influxes of commands"?
It's all relative. I would say any number that noticeably causes XI to drag. The nice thing about passive checks is regardless of how many of them you are running through the external command file, it's almost always cheaper than having XI run a script and do a thing.
Fred Kroeger wrote:Is there some way of measuring how many external commands are being processed
nagiostats has the "External Commands Last 1/5/15 min: 0 / 0 / 0" metric that should be useful. You could probably write a bash script to check that and compare it to some thresholds.
I've been running that External Command stat for a while and it's either broken or reporting something else.
Typically it's usually 0 , maybe peaking at a 4 during the day.
It would depend on how the check results are being submit. If you're doing it via the cmd value in your request set to submitcheck, that gets written to the check_results_dir directly and bypasses the external commands.
All the passive checks are Outbound NRDP Transfers from two other Nagios servers - I just assumed that the NRDP API would insert the check results as external commands.
The NRDP API as I understand it can do either. For example, in my Nagduino library it works by using the cmd=submitcmd parameter which does enter it in as an external command:
// Normal nagios external commands
case "submitcmd":
nagioscorecmd_submit_nagios_command(false);
break;
But it can also use cmd=submitcheck which in this case uses the function nrdp_write_check_output_to_cmd to write the check result to a file in the check results directory. Line 133 in /usr/local/nrdp/server/plugins/nagioscorepassivecheck/nagioscorepassivecheck.inc.php is where the function begins, and it writes to /usr/local/nagios/var/spool/checkresults by default.
Thanks - so which is the better method considering that I am receiving 400+ host & 4700+ service passive checks every 5mins? I am using a RAMDisk.
Also , in which file is "cmd=* " defined ?
Fred Kroeger wrote:Thanks - so which is the better method considering that I am receiving 400+ host & 4700+ service passive checks every 5mins? I am using a RAMDisk.
Assuming the checkresults file is on the RAMDisk, the differences are negligible. If you take the RAMDisk out of the equation, the external commands file is probably better since it's a direct pipe to memory. We'd have to do some benchmarking to say for sure, though.