nagios.cmd gets converted to a regular file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Eric05
Posts: 1
Joined: Mon Jan 28, 2019 2:02 am

nagios.cmd gets converted to a regular file

Post by Eric05 »

Hello community,
we are having some issues with our nagios.cmd.

We have Nagios core v4.4.3 and we have plenty of services being checked (>44K), where 16K are Passive checks.

This is an example on how we are sending Passive checks with Perl:

Code: Select all

qx,echo "[\$(date +%s)] PROCESS_SERVICE_CHECK_RESULT;$host;$service;$return_code;$plugin_output" >> $nagcmdfile,;
Our problem is that randomly the nagios.cmd gets converted to a normal file instead of a named pipe. When converted to a regular file, we can see many of the passive checks inside of it.

Code: Select all

-rw-r--r-- 1 nagios nagios 2179260 May  7 09:43 nagios.cmd
As I said, is completely random, that's why we are discarding that is one of the service checks, otherwise it should happen on regular basis.

Could be possible that we are facing some limitations on the named pipe?

Code: Select all

 cat /proc/sys/fs/pipe-max-size
1048576
Any ideas are welcome! Thank you everyone :D .

Below our nagiostats output:

Code: Select all

Nagios Stats 4.4.3
Copyright (c) 2003-2008 Ethan Galstad (www.nagios.org)
Last Modified: 2019-01-15
License: GPL

CURRENT STATUS DATA
------------------------------------------------------
Status File:                            /dev/shm/status.dat
Status File Age:                        0d 0h 0m 11s
Status File Version:                    4.4.3

Program Running Time:                   0d 1h 4m 3s
Nagios PID:                             13414

Total Services:                         44807
Services Checked:                       44807
Services Scheduled:                     28688
Services Actively Checked:              28690
Services Passively Checked:             16117
Total Service State Change:             0.000 / 29.210 / 0.017 %
Active Service Latency:                 0.000 / 0.398 / 0.003 sec
Active Service Execution Time:          0.001 / 300.007 / 0.744 sec
Active Service State Change:            0.000 / 29.210 / 0.027 %
Active Services Last 1/5/15/60 min:     2908 / 15154 / 28688 / 28688
Passive Service Latency:                0.030 / 25.789 / 1.360 sec
Passive Service State Change:           0.000 / 6.250 / 0.001 %
Passive Services Last 1/5/15/60 min:    1238 / 5919 / 16077 / 16077
Services Ok/Warn/Unk/Crit:              44466 / 229 / 16 / 96
Services Flapping:                      0
Services In Downtime:                   7

Total Hosts:                            2878
Hosts Checked:                          2878
Hosts Scheduled:                        0
Hosts Actively Checked:                 2878
Host Passively Checked:                 0
Total Host State Change:                0.000 / 0.000 / 0.000 %
Active Host Latency:                    0.000 / 4.864 / 0.003 sec
Active Host Execution Time:             0.001 / 0.412 / 0.003 sec
Active Host State Change:               0.000 / 0.000 / 0.000 %
Active Hosts Last 1/5/15/60 min:        4 / 14 / 32 / 77
Passive Host Latency:                   0.000 / 0.000 / 0.000 sec
Passive Host State Change:              0.000 / 0.000 / 0.000 %
Passive Hosts Last 1/5/15/60 min:       0 / 0 / 0 / 0
Hosts Up/Down/Unreach:                  2878 / 0 / 0
Hosts Flapping:                         0
Hosts In Downtime:                      0

Active Host Checks Last 1/5/15 min:     44 / 192 / 563
   Scheduled:                           4 / 14 / 35
   On-demand:                           40 / 178 / 528
   Parallel:                            4 / 14 / 35
   Serial:                              0 / 0 / 0
   Cached:                              40 / 178 / 528
Passive Host Checks Last 1/5/15 min:    0 / 0 / 0
Active Service Checks Last 1/5/15 min:  3753 / 15579 / 46397
   Scheduled:                           3753 / 15579 / 46397
   On-demand:                           0 / 0 / 0
   Cached:                              0 / 0 / 0
Passive Service Checks Last 1/5/15 min: 82 / 95 / 249

External Commands Last 1/5/15 min:      1404 / 6189 / 22268
Locked