State Type

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
anish
Posts: 161
Joined: Tue Jul 19, 2016 5:29 am

State Type

Post by anish »

Hello,

I have a service to check all drives for windows.

Warning - 10%
Critical - 5%

The C drive utilization is 86% but it still alerts as warning.
When I force an immediate check it turns ok. But in the next minute it turns back to hard and warning.

Attached.
You do not have the required permissions to view the files attached to this post.
anish
Posts: 161
Joined: Tue Jul 19, 2016 5:29 am

Re: State Type

Post by anish »

The attempts for all hosts and services is stuck to 1/5 it is not progressing.

What is wrong with this?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: State Type

Post by lmiltchev »

What is the Nagios XI version that you are currently using?

Run the following commands, and show the output in code wraps:

Code: Select all

uname -a
cat /etc/*release
chage nagios -l
grep broker /usr/local/nagios/etc/nagios.cfg
tail -50 /var/log/mysqld.log
service nagios stop
service ndo2db stop
service ndo2db start
service nagios start
service nagios status
service ndo2db status
service crond status
Also, show the config of one of the "problem" services, and all relevant templates, and commands (used by this service).
Be sure to check out our Knowledgebase for helpful articles and solutions!
anish
Posts: 161
Joined: Tue Jul 19, 2016 5:29 am

Re: State Type

Post by anish »

NagiosXI Version 5.2.9

Code: Select all

uname -a
Linux SGKCLNGCOREPD03 2.6.32-642.1.1.el6.x86_64 #1 SMP Tue May 31 21:57:07 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

[root@SGKCLNGCOREPD03 ~]# cat /etc/*release
CentOS release 6.8 (Final)
CentOS release 6.8 (Final)
CentOS release 6.8 (Final)
[root@SGKCLNGCOREPD03 ~]#

[root@SGKCLNGCOREPD03 ~]# chage nagios -l
Last password change                                    : Jun 14, 2016
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
[root@SGKCLNGCOREPD03 ~]#


[root@SGKCLNGCOREPD03 ~]# grep broker /usr/local/nagios/etc/nagios.cfg
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
event_broker_options=-1
[root@SGKCLNGCOREPD03 ~]#

[root@SGKCLNGCOREPD03 ~]# tail -50 /var/log/mysqld.log
160728 10:00:39  InnoDB: Completed initialization of buffer pool
160728 10:00:39  InnoDB: Started; log sequence number 0 44233
160728 10:00:39 [Note] Event Scheduler: Loaded 0 events
160728 10:00:39 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
160728 10:13:22 [Note] /usr/libexec/mysqld: Normal shutdown

160728 10:13:22 [Note] Event Scheduler: Purging the queue. 0 events
160728 10:13:24  InnoDB: Starting shutdown...
160728 10:13:25  InnoDB: Shutdown completed; log sequence number 0 44233
160728 10:13:25 [Note] /usr/libexec/mysqld: Shutdown complete

160728 22:13:25 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160728 22:13:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160728 22:13:26  InnoDB: Initializing buffer pool, size = 8.0M
160728 22:13:26  InnoDB: Completed initialization of buffer pool
160728 22:13:26  InnoDB: Started; log sequence number 0 44233
160728 22:13:26 [Note] Event Scheduler: Loaded 0 events
160728 22:13:26 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
160928 16:51:08 [Note] /usr/libexec/mysqld: Normal shutdown

160928 16:51:08 [Note] Event Scheduler: Purging the queue. 0 events
160928 16:51:08  InnoDB: Starting shutdown...
160928 16:51:13  InnoDB: Shutdown completed; log sequence number 0 44233
160928 16:51:13 [Note] /usr/libexec/mysqld: Shutdown complete

160928 16:51:14 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160928 16:51:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160928 16:51:55  InnoDB: Initializing buffer pool, size = 8.0M
160928 16:51:55  InnoDB: Completed initialization of buffer pool
160928 16:51:55  InnoDB: Started; log sequence number 0 44233
160928 16:51:55 [Note] Event Scheduler: Loaded 0 events
160928 16:51:55 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
161010 23:21:34 [Note] /usr/libexec/mysqld: Normal shutdown

161010 23:21:34 [Note] Event Scheduler: Purging the queue. 0 events
161010 23:21:36  InnoDB: Starting shutdown...
161010 23:21:37  InnoDB: Shutdown completed; log sequence number 0 44233
161010 23:21:37 [Note] /usr/libexec/mysqld: Shutdown complete

161010 23:21:37 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
161010 23:22:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
161010 23:22:44  InnoDB: Initializing buffer pool, size = 8.0M
161010 23:22:44  InnoDB: Completed initialization of buffer pool
161010 23:22:45  InnoDB: Started; log sequence number 0 44233
161010 23:22:45 [Note] Event Scheduler: Loaded 0 events
161010 23:22:45 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution

[root@SGKCLNGCOREPD03 ~]# service nagios stop
Stopping nagios:. done.
[root@SGKCLNGCOREPD03 ~]# service ndo2db stop
Stopping ndo2db: done.
[root@SGKCLNGCOREPD03 ~]# service ndo2db start
Starting ndo2db: done.
[root@SGKCLNGCOREPD03 ~]# service nagios start
Starting nagios: done.
[root@SGKCLNGCOREPD03 ~]# service nagios status
nagios (pid 19651) is running...
You have new mail in /var/spool/mail/root
[root@SGKCLNGCOREPD03 ~]# service ndo2db status
ndo2db (pid 19617) is running...
[root@SGKCLNGCOREPD03 ~]# service crond status
crond (pid  1899) is running...
[root@SGKCLNGCOREPD03 ~]#

Service Drive_check_NSclient

Code: Select all

[root@SGKCLNGCOREPD03 services]# cat Drive_check_NSClient.cfg
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date:       2016-10-11 00:14:20
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define service {
        service_description             Check All drives
        use                             xiwizard_windowsserver_nsclient_service
        hostgroup_name                  Windows_Servers
        check_command                   check_nrpe!checkdrivesize!-a CheckAll MinWarn=10% MinCrit=5%!!!!!!
        max_check_attempts              5
        check_interval                  5
        retry_interval                  1
        check_period                    xi_timeperiod_24x7
        notification_interval           15
        notification_period             xi_timeperiod_24x7
        notification_options            w,c,u,r,
        notifications_enabled           1
        contacts                        nagiosadmin
        stalking_options                o,w,c,u,
        _xiwizard                       windowsserver
        register                        1
        }

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
[root@SGKCLNGCOREPD03 services]#

rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: State Type

Post by rkennedy »

Could you also show us how 'checkdrivesize' is defined on the client side through NRPE? Which version of NSClient++ are you running?

One other thing it may be, is multiple Nagios processes running. (with one being an older configuration) What is the full output of ps -ef?
Former Nagios Employee
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: State Type

Post by ssax »

In addition to what rkennedy wrote, I think the issue with that specific service is that it sometimes is returning GB and sometimes is returning MB, try using the perf-unit=G or perf-unit=M options, see here for examples:

http://sites.box293.com/nagios/guides/c ... disk-usage

Let us know if that fixes the issue.


Thank you
anish
Posts: 161
Joined: Tue Jul 19, 2016 5:29 am

Re: State Type

Post by anish »

Thank you. that's resolved. Please close this ticket.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: State Type

Post by avandemore »

Great to hear anish. Please open a new thread if you have further issues.
Previous Nagios employee
Locked