Page 1 of 4

XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 10:22 am
by Keo
According to the XI interface, the performance graph process isn't running. When I try to start it I get an error
perf_graph.png
When I go to the linux host, it shows the NPCD service is running:

Code: Select all

# service npcd status
NPCD running (pid 12353).
The /usr/local/nagios/var/npcd.log file shows no errors either:

Code: Select all

[08-30-2013 10:11:07] NPCD: Processing file 1377875460.perfdata.host with ID 140539518453504 - going to exec /usr/local/nagios/libexec/process_perfdata.pl -n -b /usr/local/nagios/var/spool/perfdata//1377875460.perfdata.host
[08-30-2013 10:11:07] NPCD: Processing file '1377875460.perfdata.host'
[08-30-2013 10:11:07] NPCD: ThreadCounter 1/5 File is 1377875460.perfdata.service
[08-30-2013 10:11:07] NPCD: Regular File: 1377875460.perfdata.service
[08-30-2013 10:11:07] NPCD: A thread was started on thread_counter = 1
[08-30-2013 10:11:07] NPCD: Processing file 1377875460.perfdata.service with ID 140539507963648 - going to exec /usr/local/nagios/libexec/process_perfdata.pl -n -b /usr/local/nagios/var/spool/perfdata//1377875460.perfdata.service
[08-30-2013 10:11:07] NPCD: Have to wait: Filecounter = 2 - thread_counter = 2
[08-30-2013 10:11:07] NPCD: Processing file '1377875460.perfdata.service'
[08-30-2013 10:11:07] NPCD: No more files to process... waiting for 15 seconds
[08-30-2013 10:11:22] NPCD: Found 4 files in /usr/local/nagios/var/spool/perfdata/
[08-30-2013 10:11:22] NPCD: DEBUG: load 0.020000/10.000000
[08-30-2013 10:11:22] NPCD: ThreadCounter 0/5 File is .
[08-30-2013 10:11:22] NPCD: DEBUG: load 0.020000/10.000000
[08-30-2013 10:11:22] NPCD: ThreadCounter 0/5 File is ..
[08-30-2013 10:11:22] NPCD: DEBUG: load 0.020000/10.000000
[08-30-2013 10:11:22] NPCD: ThreadCounter 0/5 File is 1377875475.perfdata.host
[08-30-2013 10:11:22] NPCD: Regular File: 1377875475.perfdata.host
[08-30-2013 10:11:22] NPCD: A thread was started on thread_counter = 0
[08-30-2013 10:11:22] NPCD: Processing file 1377875475.perfdata.host with ID 140539518453504 - going to exec /usr/local/nagios/libexec/process_perfdata.pl -n -b /usr/local/nagios/var/spool/perfdata//1377875475.perfdata.host
[08-30-2013 10:11:22] NPCD: DEBUG: load 0.020000/10.000000
[08-30-2013 10:11:22] NPCD: Processing file '1377875475.perfdata.host'
[08-30-2013 10:11:22] NPCD: ThreadCounter 1/5 File is 1377875475.perfdata.service
[08-30-2013 10:11:22] NPCD: Regular File: 1377875475.perfdata.service
[08-30-2013 10:11:22] NPCD: A thread was started on thread_counter = 1
[08-30-2013 10:11:22] NPCD: Have to wait: Filecounter = 2 - thread_counter = 2
[08-30-2013 10:11:22] NPCD: Processing file 1377875475.perfdata.service with ID 140539507963648 - going to exec /usr/local/nagios/libexec/process_perfdata.pl -n -b /usr/local/nagios/var/spool/perfdata//1377875475.perfdata.service
[08-30-2013 10:11:22] NPCD: Processing file '1377875475.perfdata.service'
[08-30-2013 10:11:22] NPCD: No more files to process... waiting for 15 seconds
[08-30-2013 10:11:31] NPCD: Caught Termination Signal - Hasta la vista... baby
[08-30-2013 10:11:31] NPCD: npcd Daemon (0.4.14) started with PID=12353
[08-30-2013 10:11:31] NPCD: Please have a look at 'npcd -V' to get license information
[08-30-2013 10:11:31] NPCD: HINT: load_threshold is enabled - ('10.000000')
Any suggestions on what might be causing this?

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 10:52 am
by lmiltchev
What is the load on the server? It is possible, that once in a while it gets higher than the load_threshold of 10, specified in the "/usr/local/nagios/etc/pnp/npcd.cfg".

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 10:58 am
by Keo
lmiltchev wrote:What is the load on the server? It is possible, that once in a while it gets higher than the load_threshold of 10, specified in the "/usr/local/nagios/etc/pnp/npcd.cfg".
There are only 5 hosts configured within Nagios right now so the load is pretty low

Code: Select all

top - 10:57:50 up 35 days, 14:57,  1 user,  load average: 0.00, 0.02, 0.00
Tasks: 186 total,   1 running, 185 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.3%us,  0.7%sy,  0.0%ni, 97.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  16334656k total,  3197464k used, 13137192k free,   349032k buffers
Swap: 16744440k total,        0k used, 16744440k free,  2046464k cached

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 11:08 am
by lmiltchev
Hm-m, this is strange. Have you restarted the server lately? Maybe npcd didn't start on reboot. What is the output of the following command?

Code: Select all

chkconfig --list | grep npcd

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 12:26 pm
by Keo
lmiltchev wrote:Hm-m, this is strange. Have you restarted the server lately? Maybe npcd didn't start on reboot. What is the output of the following command?

Code: Select all

chkconfig --list | grep npcd

Code: Select all

#chkconfig --list | grep npcd
npcd            0:off   1:off   2:off   3:on    4:off   5:on    6:off
I just did a reboot and still the same issue

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 1:29 pm
by abrist
Lets make sure that it is not loading the daemon twice and causing multiple parent process issues:

Code: Select all

service npcd stop
killall npcd
ps -aef | grep npcd
service npcd start
Wait a few moments and then check the web UI again.

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 1:37 pm
by lmiltchev
Run the following command:

Code: Select all

/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
then hit "Ctrl + C" to break out of it, and post the output.

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 1:51 pm
by Keo
lmiltchev wrote:Run the following command:

Code: Select all

/usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
then hit "Ctrl + C" to break out of it, and post the output.

Code: Select all

# /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php
DB BACKEND:
Array
(
    [last_checkin] => 2013-08-30 13:49:32
    [bytes_processed] => 310684
    [entries_processed] => 1208
    [connect_time] => 2013-08-30 13:32:32
    [disconnect_time] => 0000-00-00 00:00:00
)
CMDLINE=/etc/init.d/nagios status
nagios (pid 22449) is running...
OUTPUT=nagios (pid 22449) is running...
RETURNCODE=0
CMDLINE=/etc/init.d/npcd status
NPCD running (pid 1676).
OUTPUT=NPCD running (pid 1676).
RETURNCODE=0
CMDLINE=/etc/init.d/ndo2db status
ndo2db (pid 1769) is running...
OUTPUT=ndo2db (pid 1769) is running...
RETURNCODE=0
DAEMONS:
Array
(
    [nagioscore] => Array
        (
            [daemon] => nagios
            [output] => nagios (pid 22449) is running...
            [return_code] => 0
            [status] => 0
        )

    [pnp] => Array
        (
            [daemon] => npcd
            [output] => NPCD running (pid 1676).
            [return_code] => 0
            [status] => 0
        )

    [ndoutils] => Array
        (
            [daemon] => ndo2db
            [output] => ndo2db (pid 1769) is running...
            [return_code] => 0
            [status] => 0
        )

)
CORE STATS:
Array
(
    [activehostchecks] => Array
        (
            [1min] => 2
            [5min] => 5
            [15min] => 5
        )

    [passivehostchecks] => Array
        (
            [1min] => 0
            [5min] => 0
            [15min] => 0
        )

    [activeservicechecks] => Array
        (
            [1min] => 2
            [5min] => 20
            [15min] => 20
        )

    [passiveservicechecks] => Array
        (
            [1min] => 0
            [5min] => 0
            [15min] => 0
        )

    [activehostcheckperf] => Array
        (
            [min_latency] => 0.006
            [max_latency] => 0.219
            [avg_latency] => 0.0954
            [min_execution_time] => 0.00305
            [max_execution_time] => 0.05121
            [avg_execution_time] => 0.017432
        )

    [activeservicecheckperf] => Array
        (
            [min_latency] => 0.006
            [max_latency] => 0.247
            [avg_latency] => 0.0916
            [min_execution_time] => 0.00264
            [max_execution_time] => 4.00441
            [avg_execution_time] => 0.364037
        )

)
LOAD:
Array
(
    [load1] => 0.17
    [load5] => 0.45
    [load15] => 0.41
)
MEMORY:
Array
(
    [total] => 15951
    [used] => 1088
    [free] => 14863
    [shared] => 0
    [buffers] => 46
    [cached] => 392
)
SWAP:
Array
(
    [total] => 16351
    [used] => 0
    [free] => 16351
)

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 1:54 pm
by slansing
Are you still receiving performance data on your graphs properly? This may be a glitch elsewhere. What version of XI are you running?

Re: XI Shows performance graph isn't running

Posted: Fri Aug 30, 2013 2:05 pm
by Keo
slansing wrote:Are you still receiving performance data on your graphs properly? This may be a glitch elsewhere. What version of XI are you running?
It looks like I am receiving graphs.
graph.png
I am running Nagios XI Version : 2012R2.3

Here is my system info.

Code: Select all

System:

Nagios XI Version : 2012R2.3
***** 2.6.32-358.14.1.el6.x86_64 x86_64
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Gnome is not installed

Apache Information

PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0
Server Name: ****************
Server Address: 172.24.188.8
Server Port: 80

Date/Time

PHP Timezone: America/Chicago
PHP Time: Fri, 30 Aug 2013 13:59:57 -0500
System Time: Fri, 30 Aug 2013 13:59:57 -0500

Nagios XI Data

nagios (pid 22449) is running...
NPCD not running.
ndo2db (pid 1769) is running...
CPU Load 15: 0.27
Total Hosts: 5
Total Services: 20
Function 'get_base_uri' returns: http://****************/nagiosxi/
Function 'get_base_url' returns: http://****************/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://****************/nagiosxi/includes/components/profile/profile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/

Ping Test localhost

Running:

/bin/ping -c 3 localhost 2>&1 

PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.021 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.024 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.029 ms

--- localhost.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.021/0.024/0.029/0.006 ms
Test wget To locahost
WGET From URL: http://localhost/nagiosql/index.php
Running:

/usr/bin/wget http://localhost/nagiosql/index.php 

--2013-08-30 13:59:59-- http://localhost/nagiosql/index.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `/tmp/nagiosql_index.tmp'

0K ..... 100% 272M=0s

2013-08-30 13:59:59 (272 MB/s) - `/tmp/nagiosql_index.tmp' saved [5259/5259]