Page 1 of 2

Have to Restart Nagios VM Periodically

Posted: Wed Mar 13, 2013 12:32 pm
by easy2kent
Hello,

I have a Nagios Virtual Machine set up and have had it running for over a year now and it was running smooth. Lately though, the Nagios web service will become almost unresponsive and all the checks will be critical but no notifications will be sent out. This happen about once a week. We are running 2012R1.5b with CentOS on a virtual machine. I was just wondering if there is a fix for this or if there is some maintenance or a setting that can be changed to help this from happening. When I restart the virtual machine I have to restart postgresql.

Thanks

Re: Have to Restart Nagios VM Periodically

Posted: Wed Mar 13, 2013 1:10 pm
by abrist
What is the load/memory usage/disk usage on this system?

What it starts to slow down, run:

Code: Select all

ps -aef
And post the output.

Re: Have to Restart Nagios VM Periodically

Posted: Wed Apr 17, 2013 12:48 pm
by easy2kent
Sorry this happened again a couple of weeks ago and I did not run any command, I restarted the VM and had to run a service postgresql restart because when it the VM restarts postgresql is not started.
This happened again today and this time I remembered to try and run the command from the post above, but I was not successful in running the command. The Nagios VM is frozen to where the command prompt will not even come up. The only option I can think of is to restart the VM and restart postgresql. Is there any way to diagnose what is going on after the fact?

Thanks,
Kent

Re: Have to Restart Nagios VM Periodically

Posted: Wed Apr 17, 2013 1:13 pm
by slansing
are you able to run a:

Code: Select all

df -h

df -i 
and the command above when the system is up after a restart?

Please post the output.

Re: Have to Restart Nagios VM Periodically

Posted: Wed Apr 17, 2013 1:24 pm
by easy2kent
df -h:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
8.6G 4.3G 4.0G 52% /
/dev/sda1 99M 19M 76M 20% /boot
tmpfs 379M 0 379M 0% /dev/shm

df -i:
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup00-LogVol00
2326528 174748 2151780 8% /
/dev/sda1 26104 41 26063 1% /boot
tmpfs 96826 1 96825 1% /dev/shm

Re: Have to Restart Nagios VM Periodically

Posted: Wed Apr 17, 2013 4:12 pm
by abrist
Lets check for system level issues:

Code: Select all

cat /var/log/messages* | grep -i segfault
As the machine starts to chug, run:

Code: Select all

ps -aef 
Does the vm host have enough resources for the vm?
Lets check the postgres startup log:

Code: Select all

tail -100 /var/lib/pgsql/pgstartup.log

Re: Have to Restart Nagios VM Periodically

Posted: Thu Apr 18, 2013 10:02 am
by easy2kent
cat /var/log/messages* | grep -i segfault:
returned nothing

ps-aef:

Code: Select all

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Apr17 ?        00:00:01 init [3]
root         2     1  0 Apr17 ?        00:00:00 [migration/0]
root         3     1  0 Apr17 ?        00:00:00 [ksoftirqd/0]
root         4     1  0 Apr17 ?        00:00:00 [events/0]
root         5     1  0 Apr17 ?        00:00:00 [khelper]
root         6     1  0 Apr17 ?        00:00:00 [kthread]
root         9     6  0 Apr17 ?        00:00:01 [kblockd/0]
root        10     6  0 Apr17 ?        00:00:00 [kacpid]
root       168     6  0 Apr17 ?        00:00:00 [cqueue/0]
root       171     6  0 Apr17 ?        00:00:00 [khubd]
root       173     6  0 Apr17 ?        00:00:00 [kseriod]
root       237     6  0 Apr17 ?        00:00:00 [khungtaskd]
root       238     6  0 Apr17 ?        00:00:00 [pdflush]
root       239     6  0 Apr17 ?        00:00:55 [pdflush]
root       240     6  0 Apr17 ?        00:00:00 [kswapd0]
root       241     6  0 Apr17 ?        00:00:00 [aio/0]
root       459     6  0 Apr17 ?        00:00:00 [kpsmoused]
root       489     6  0 Apr17 ?        00:00:00 [mpt_poll_0]
root       490     6  0 Apr17 ?        00:00:00 [mpt/0]
root       491     6  0 Apr17 ?        00:00:00 [scsi_eh_0]
root       494     6  0 Apr17 ?        00:00:00 [ata/0]
root       495     6  0 Apr17 ?        00:00:00 [ata_aux]
root       500     6  0 Apr17 ?        00:00:00 [kstriped]
root       509     6  0 Apr17 ?        00:00:00 [ksnapd]
root       520     6  0 Apr17 ?        00:01:04 [kjournald]
root       545     6  0 Apr17 ?        00:00:00 [kauditd]
root       578     1  0 Apr17 ?        00:00:00 /sbin/udevd -d
root      1677     6  0 Apr17 ?        00:00:00 [kmpathd/0]
root      1678     6  0 Apr17 ?        00:00:00 [kmpath_handlerd]
root      1697     6  0 Apr17 ?        00:00:00 [kjournald]
root      2153     6  0 Apr17 ?        00:00:00 [vmmemctl]
root      2364     1  0 Apr17 ?        00:00:02 /usr/sbin/vmtoolsd
root      2438     1  0 Apr17 ?        00:00:00 cupsd
root      2533     6  0 Apr17 ?        00:00:00 [iscsi_eh]
root      2579     6  0 Apr17 ?        00:00:00 [ib_addr]
root      2586     6  0 Apr17 ?        00:00:00 [ib_mcast]
root      2587     6  0 Apr17 ?        00:00:00 [ib_inform]
root      2588     6  0 Apr17 ?        00:00:00 [local_sa]
root      2591     6  0 Apr17 ?        00:00:00 [iw_cm_wq]
root      2595     6  0 Apr17 ?        00:00:00 [ib_cm/0]
root      2597     6  0 Apr17 ?        00:00:00 [rdma_cm]
root      2613     1  0 Apr17 ?        00:00:00 brcm_iscsiuio
root      2618     1  0 Apr17 ?        00:00:00 iscsid
root      2619     1  0 Apr17 ?        00:00:00 iscsid
root      2929     1  0 Apr17 ?        00:00:00 syslogd -m 0
root      2932     1  0 Apr17 ?        00:00:00 klogd -x
root      2986     6  0 Apr17 ?        00:00:00 [rpciod/0]
root      3024     1  0 Apr17 ?        00:00:00 rpc.idmapd
dbus      3047     1  0 Apr17 ?        00:00:00 dbus-daemon --system
root      3090     1  0 Apr17 ?        00:00:00 pcscd
root      3104     1  0 Apr17 ?        00:00:00 /usr/sbin/acpid
68        3120     1  0 Apr17 ?        00:00:00 hald
root      3121  3120  0 Apr17 ?        00:00:00 hald-runner
68        3129  3121  0 Apr17 ?        00:00:00 hald-addon-acpi: listening on ac
68        3136  3121  0 Apr17 ?        00:00:00 hald-addon-keyboard: listening o
root      3145  3121  0 Apr17 ?        00:00:01 hald-addon-storage: polling /dev
root      3176     1  0 Apr17 ?        00:00:00 /usr/bin/hidd --server
root      3216     1  0 Apr17 ?        00:00:00 automount
root      3293     1  0 Apr17 ?        00:00:00 /usr/sbin/sshd
root      3310     1  0 Apr17 ?        00:00:00 xinetd -stayalive -pidfile /var/
root      3347     1  0 Apr17 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --d
mysql     3394  3347  0 Apr17 ?        00:00:49 /usr/libexec/mysqld --basedir=/u
root      3434     1  0 Apr17 ?        00:00:00 sendmail: accepting connections
smmsp     3442     1  0 Apr17 ?        00:00:00 sendmail: Queue runner@01:00:00
root      3456     1  0 Apr17 ?        00:00:00 gpm -m /dev/input/mice -t exps2
root      3470     1  0 Apr17 ?        00:00:00 /usr/sbin/httpd
root      3483     1  0 Apr17 ?        00:00:00 crond
xfs       3510     1  0 Apr17 ?        00:00:00 xfs -droppriv -daemon
nagios    3529     1  0 Apr17 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c
nagios    3538     1  0 Apr17 ?        00:00:00 /usr/local/nagios/bin/npcd -d -f
root      3562     1  0 Apr17 ?        00:00:00 /usr/sbin/atd
nagios    3580  3529  0 Apr17 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c
nagios    3581  3580  0 Apr17 ?        00:00:09 /usr/local/nagios/bin/ndo2db -c
nagios    3584     1  0 Apr17 ?        00:00:10 /usr/local/nagios/bin/nagios -d
avahi     3617     1  0 Apr17 ?        00:00:00 avahi-daemon: running [E2TNagios
avahi     3618  3617  0 Apr17 ?        00:00:00 avahi-daemon: chroot helper
apache    3631  3470  0 Apr17 ?        00:03:58 /usr/sbin/httpd
apache    3632  3470  0 Apr17 ?        00:03:57 /usr/sbin/httpd
apache    3633  3470  0 Apr17 ?        00:04:03 /usr/sbin/httpd
apache    3634  3470  0 Apr17 ?        00:03:59 /usr/sbin/httpd
apache    3635  3470  0 Apr17 ?        00:03:54 /usr/sbin/httpd
apache    3636  3470  0 Apr17 ?        00:03:59 /usr/sbin/httpd
apache    3637  3470  0 Apr17 ?        00:04:01 /usr/sbin/httpd
apache    3638  3470  0 Apr17 ?        00:03:57 /usr/sbin/httpd
ajaxterm  3650     1  0 Apr17 ?        00:00:00 python /usr/share/ajaxterm/ajaxt
root      3681     1  0 Apr17 ?        00:00:00 /usr/sbin/smartd -q never
root      3684     1  0 Apr17 ?        00:00:00 login -- root
root      3685     1  0 Apr17 tty2     00:00:00 /sbin/mingetty tty2
root      3686     1  0 Apr17 tty3     00:00:00 /sbin/mingetty tty3
root      3687     1  0 Apr17 tty4     00:00:00 /sbin/mingetty tty4
root      3688     1  0 Apr17 tty5     00:00:00 /sbin/mingetty tty5
root      3719     1  0 Apr17 tty6     00:00:00 /sbin/mingetty tty6
apache    3959  3470  0 Apr17 ?        00:03:59 /usr/sbin/httpd
apache    3960  3470  0 Apr17 ?        00:03:56 /usr/sbin/httpd
apache    3961  3470  0 Apr17 ?        00:03:59 /usr/sbin/httpd
root      4344  3684  0 Apr17 tty1     00:00:00 -bash
postgres  4483     1  0 Apr17 ?        00:00:02 /usr/bin/postmaster -p 5432 -D /
postgres  4487  4483  0 Apr17 ?        00:00:00 postgres: logger process
postgres  4489  4483  0 Apr17 ?        00:00:00 postgres: writer process
postgres  4490  4483  0 Apr17 ?        00:00:00 postgres: stats buffer process
postgres  4491  4490  0 Apr17 ?        00:00:00 postgres: stats collector proces
postgres  4522  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4523  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4524  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4525  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4526  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4537  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4539  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4611  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4802  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4805  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
postgres  4808  4483  0 Apr17 ?        00:00:03 postgres: nagiosxi nagiosxi 127.
root     29541  3293  0 10:55 ?        00:00:00 sshd: root@notty
root     29564 29541  0 10:55 ?        00:00:00 -bash
root     29655  3293  0 10:55 ?        00:00:00 sshd: root@pts/0
root     29659 29655  0 10:55 pts/0    00:00:00 -bash
nagios   30671  3483  0 10:59 ?        00:00:00 crond
nagios   30672  3483  0 10:59 ?        00:00:00 crond
nagios   30673  3483  0 10:59 ?        00:00:00 crond
nagios   30674  3483  0 10:59 ?        00:00:00 crond
nagios   30681 30671  0 10:59 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios   30682 30681  0 10:59 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios   30683 30672  0 10:59 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios   30684  3483  0 10:59 ?        00:00:00 crond
nagios   30691 30673  0 10:59 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios   30692 30683  0 10:59 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios   30693 30691  0 10:59 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios   30694 30684  0 10:59 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios   30695 30694  0 10:59 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios   30696 30674  0 10:59 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios   30697 30696  0 10:59 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
postgres 30725  4483  0 10:59 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres 30729  4483  0 10:59 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres 30732  4483  0 10:59 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres 30745  4483  0 10:59 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres 30777  4483  0 10:59 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
root     30943 29659  0 10:59 pts/0    00:00:00 ps -aef
tail -100 /var/lib/pgsql/pgstartup.log:

Code: Select all

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.

fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating directory /var/lib/pgsql/data/global ... ok
creating directory /var/lib/pgsql/data/pg_xlog ... ok
creating directory /var/lib/pgsql/data/pg_xlog/archive_status ... ok
creating directory /var/lib/pgsql/data/pg_clog ... ok
creating directory /var/lib/pgsql/data/pg_subtrans ... ok
creating directory /var/lib/pgsql/data/pg_twophase ... ok
creating directory /var/lib/pgsql/data/pg_multixact/members ... ok
creating directory /var/lib/pgsql/data/pg_multixact/offsets ... ok
creating directory /var/lib/pgsql/data/base ... ok
creating directory /var/lib/pgsql/data/base/1 ... ok
creating directory /var/lib/pgsql/data/pg_tblspc ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 1000
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
enabling unlimited row size for system tables ... ok
initializing dependencies ... ok
creating system views ... ok
loading pg_description ... ok
creating conversions ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

Success. You can now start the database server using:

    /usr/bin/postmaster -D /var/lib/pgsql/data
or
    /usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start

FATAL:  lock file "postmaster.pid" already exists
HINT:  Is another postmaster (PID 5478) running in data directory "/var/lib/pgsql/data"?
LOG:  logger shutting down
LOG:  logger shutting down
LOG:  logger shutting down
LOG:  logger shutting down

Re: Have to Restart Nagios VM Periodically

Posted: Thu Apr 18, 2013 2:45 pm
by abrist
Looks like you had a lock problem with postgres. Try stopping, killing and restarting it:

Code: Select all

service postgresql stop
killall postgres
Check for any other postgres procs:

Code: Select all

ps -aef | grep postgres
If you find any, kill them by PID:

Code: Select all

kill -9 <PID>
Restart postgres:

Code: Select all

service postgresql start

Re: Have to Restart Nagios VM Periodically

Posted: Wed Apr 24, 2013 2:19 pm
by easy2kent
This happened again and I was able to run the command first suggested. Here is the output:

Code: Select all

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Apr17 ?        00:00:01 init [3]
root         2     1  0 Apr17 ?        00:00:00 [migration/0]
root         3     1  0 Apr17 ?        00:00:00 [ksoftirqd/0]
root         4     1  0 Apr17 ?        00:00:00 [events/0]
root         5     1  0 Apr17 ?        00:00:00 [khelper]
root         6     1  0 Apr17 ?        00:00:00 [kthread]
root         9     6  0 Apr17 ?        00:00:57 [kblockd/0]
root        10     6  0 Apr17 ?        00:00:00 [kacpid]
root       168     6  0 Apr17 ?        00:00:00 [cqueue/0]
root       171     6  0 Apr17 ?        00:00:00 [khubd]
root       173     6  0 Apr17 ?        00:00:00 [kseriod]
root       237     6  0 Apr17 ?        00:00:00 [khungtaskd]
root       240     6  0 Apr17 ?        00:06:04 [kswapd0]
root       241     6  0 Apr17 ?        00:00:00 [aio/0]
root       459     6  0 Apr17 ?        00:00:00 [kpsmoused]
root       489     6  0 Apr17 ?        00:00:00 [mpt_poll_0]
root       490     6  0 Apr17 ?        00:00:00 [mpt/0]
root       491     6  0 Apr17 ?        00:00:00 [scsi_eh_0]
root       494     6  0 Apr17 ?        00:00:00 [ata/0]
root       495     6  0 Apr17 ?        00:00:00 [ata_aux]
root       500     6  0 Apr17 ?        00:00:00 [kstriped]
root       509     6  0 Apr17 ?        00:00:00 [ksnapd]
root       520     6  0 Apr17 ?        00:08:11 [kjournald]
root       545     6  0 Apr17 ?        00:00:00 [kauditd]
root       578     1  0 Apr17 ?        00:00:00 /sbin/udevd -d
root      1677     6  0 Apr17 ?        00:00:00 [kmpathd/0]
root      1678     6  0 Apr17 ?        00:00:00 [kmpath_handlerd]
root      1697     6  0 Apr17 ?        00:00:00 [kjournald]
root      2153     6  0 Apr17 ?        00:00:00 [vmmemctl]
root      2364     1  0 Apr17 ?        00:00:24 /usr/sbin/vmtoolsd
root      2438     1  0 Apr17 ?        00:00:00 cupsd
root      2533     6  0 Apr17 ?        00:00:00 [iscsi_eh]
root      2579     6  0 Apr17 ?        00:00:00 [ib_addr]
root      2586     6  0 Apr17 ?        00:00:00 [ib_mcast]
root      2587     6  0 Apr17 ?        00:00:00 [ib_inform]
root      2588     6  0 Apr17 ?        00:00:00 [local_sa]
root      2591     6  0 Apr17 ?        00:00:00 [iw_cm_wq]
root      2595     6  0 Apr17 ?        00:00:00 [ib_cm/0]
root      2597     6  0 Apr17 ?        00:00:00 [rdma_cm]
root      2613     1  0 Apr17 ?        00:00:00 brcm_iscsiuio
root      2618     1  0 Apr17 ?        00:00:00 iscsid
root      2619     1  0 Apr17 ?        00:00:00 iscsid
root      2929     1  0 Apr17 ?        00:00:01 syslogd -m 0
root      2932     1  0 Apr17 ?        00:00:00 klogd -x
root      2986     6  0 Apr17 ?        00:00:00 [rpciod/0]
root      3024     1  0 Apr17 ?        00:00:00 rpc.idmapd
dbus      3047     1  0 Apr17 ?        00:00:00 dbus-daemon --system
root      3090     1  0 Apr17 ?        00:00:00 pcscd
root      3104     1  0 Apr17 ?        00:00:00 /usr/sbin/acpid
68        3120     1  0 Apr17 ?        00:00:02 hald
root      3121  3120  0 Apr17 ?        00:00:00 hald-runner
68        3129  3121  0 Apr17 ?        00:00:00 hald-addon-acpi: listening on ac
68        3136  3121  0 Apr17 ?        00:00:00 hald-addon-keyboard: listening o
root      3145  3121  0 Apr17 ?        00:00:10 hald-addon-storage: polling /dev
root      3176     1  0 Apr17 ?        00:00:00 /usr/bin/hidd --server
root      3216     1  0 Apr17 ?        00:00:00 automount
root      3293     1  0 Apr17 ?        00:00:00 /usr/sbin/sshd
root      3310     1  0 Apr17 ?        00:00:00 xinetd -stayalive -pidfile /var/
root      3347     1  0 Apr17 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --d
mysql     3394  3347  0 Apr17 ?        00:06:39 /usr/libexec/mysqld --basedir=/u
root      3434     1  0 Apr17 ?        00:00:00 sendmail: rejecting connections
smmsp     3442     1  0 Apr17 ?        00:00:00 sendmail: Queue runner@01:00:00
root      3456     1  0 Apr17 ?        00:00:00 gpm -m /dev/input/mice -t exps2
root      3470     1  0 Apr17 ?        00:00:00 /usr/sbin/httpd
root      3483     1  0 Apr17 ?        00:00:06 crond
xfs       3510     1  0 Apr17 ?        00:00:00 xfs -droppriv -daemon
nagios    3529     1  0 Apr17 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c
nagios    3538     1  0 Apr17 ?        00:00:05 /usr/local/nagios/bin/npcd -d -f
root      3562     1  0 Apr17 ?        00:00:00 /usr/sbin/atd
apache    3567  3470  0 15:04 ?        00:00:01 /usr/sbin/httpd
avahi     3617     1  0 Apr17 ?        00:00:01 avahi-daemon: running [E2TNagios
avahi     3618  3617  0 Apr17 ?        00:00:00 avahi-daemon: chroot helper
apache    3648  3470  0 15:05 ?        00:00:00 /usr/sbin/httpd
ajaxterm  3650     1  0 Apr17 ?        00:00:02 python /usr/share/ajaxterm/ajaxt
root      3681     1  0 Apr17 ?        00:00:00 /usr/sbin/smartd -q never
root      3684     1  0 Apr17 ?        00:00:00 login -- root
root      3685     1  0 Apr17 tty2     00:00:00 /sbin/mingetty tty2
root      3686     1  0 Apr17 tty3     00:00:00 /sbin/mingetty tty3
root      3687     1  0 Apr17 tty4     00:00:00 /sbin/mingetty tty4
root      3688     1  0 Apr17 tty5     00:00:00 /sbin/mingetty tty5
root      3719     1  0 Apr17 tty6     00:00:00 /sbin/mingetty tty6
postgres  4112 22548  0 15:07 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres  4132 22548  0 15:07 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
root      4344  3684  0 Apr17 tty1     00:00:00 -bash
root      5388  3293  0 15:14 ?        00:00:00 sshd: root@pts/0
root      5411  5388  0 15:14 pts/0    00:00:00 -bash
root      5558     6  0 15:15 ?        00:00:00 [pdflush]
nagios    5572  3483  0 15:15 ?        00:00:00 [crond] <defunct>
nagios    5573  3483  0 15:15 ?        00:00:00 crond
nagios    5627  5573  0 15:15 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5642  5627  0 15:16 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios    5648  3483  0 15:16 ?        00:00:00 crond
nagios    5649  3483  0 15:16 ?        00:00:00 crond
nagios    5650  3483  0 15:16 ?        00:00:00 crond
nagios    5651  3483  0 15:16 ?        00:00:00 crond
nagios    5659  5648  0 15:16 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5660  5659  0 15:16 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios    5670  5649  0 15:16 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5671  5670  0 15:16 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios    5672  5650  0 15:16 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5673  5672  0 15:16 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
root      5711     6  0 15:16 ?        00:00:00 [pdflush]
nagios    5731  3483  0 15:16 ?        00:00:00 crond
nagios    5756  5731  0 15:16 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5757  5756  0 15:16 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
postgres  5766 22548  0 15:16 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
nagios    5783  9501  0 15:16 ?        00:00:00 /usr/local/nagios/bin/nagios -d
nagios    5784  5783  0 15:16 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios    5785  9501  0 15:16 ?        00:00:00 /usr/local/nagios/bin/nagios -d
nagios    5786  5651  0 15:16 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5787  5786  0 15:16 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
postgres  5817 22548  0 15:16 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres  5818 22548  0 15:16 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres  5867 22548  0 15:16 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres  5870 22548  0 15:16 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
nagios    5897  5785  0 15:16 ?        00:00:00 sh -c /usr/local/nagios/libexec/
nagios    5928  5757  0 15:16 ?        00:00:00 /bin/sh /etc/init.d/npcd status
nagios    5930  5928  0 15:16 ?        00:00:00 ps -p 3538
nagios    5933  9501  0 15:16 ?        00:00:00 [nagios] <defunct>
nagios    5935  9501  0 15:16 ?        00:00:00 [nagios] <defunct>
nagios    5937  9501  0 15:16 ?        00:00:00 [nagios] <defunct>
nagios    5939  9501  0 15:16 ?        00:00:00 /usr/local/nagios/bin/nagios -d
nagios    5940  5939  0 15:16 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios    5941  9501  0 15:16 ?        00:00:00 /usr/local/nagios/bin/nagios -d
nagios    5942  5941  0 15:16 ?        00:00:00 sh -c /usr/local/nagios/libexec/
nagios    5943  9501  0 15:16 ?        00:00:00 /usr/local/nagios/bin/nagios -d
nagios    5962  3483  0 15:17 ?        00:00:00 crond
nagios    5963  3483  0 15:17 ?        00:00:00 crond
nagios    5964  3483  0 15:17 ?        00:00:00 crond
nagios    5965  3483  0 15:17 ?        00:00:00 crond
nagios    5966  3483  0 15:17 ?        00:00:00 crond
nagios    5967  3483  0 15:17 ?        00:00:00 crond
root      5968  3483  0 15:17 ?        00:00:00 crond
nagios    5969  5962  0 15:17 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5970  5969  0 15:17 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios    5971  5963  0 15:17 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5972  5971  0 15:17 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios    5973  5964  0 15:17 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5974  5973  0 15:17 ?        00:00:00 /usr/bin/php -q /usr/local/nagio
nagios    5975  5965  0 15:17 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5976  5975  0 15:17 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5977  5966  0 15:17 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/
nagios    5981  5967  0 15:17 ?        00:00:00 crond
root      5996  5411  0 15:17 pts/0    00:00:00 ps -aef
apache    7969  3470  0 Apr21 ?        00:16:13 /usr/sbin/httpd
apache    7970  3470  0 Apr21 ?        00:16:10 /usr/sbin/httpd
apache    7971  3470  0 Apr21 ?        00:16:22 /usr/sbin/httpd
apache    7972  3470  0 Apr21 ?        00:16:23 /usr/sbin/httpd
apache    7973  3470  0 Apr21 ?        00:16:16 /usr/sbin/httpd
apache    7974  3470  0 Apr21 ?        00:16:08 /usr/sbin/httpd
apache    7975  3470  0 Apr21 ?        00:16:13 /usr/sbin/httpd
apache    7976  3470  0 Apr21 ?        00:16:16 /usr/sbin/httpd
postgres  8090 22548  0 Apr21 ?        00:00:12 postgres: nagiosxi nagiosxi 127.
postgres  8215 22548  0 Apr21 ?        00:00:12 postgres: nagiosxi nagiosxi 127.
postgres  8375 22548  0 Apr21 ?        00:00:13 postgres: nagiosxi nagiosxi 127.
postgres  8635 22548  0 Apr21 ?        00:00:13 postgres: nagiosxi nagiosxi 127.
postgres  8698 22548  0 Apr21 ?        00:00:13 postgres: nagiosxi nagiosxi 127.
postgres  8845 22548  0 Apr21 ?        00:00:12 postgres: nagiosxi nagiosxi 127.
postgres  8935 22548  0 Apr21 ?        00:00:12 postgres: nagiosxi nagiosxi 127.
postgres  9004 22548  0 Apr21 ?        00:00:13 postgres: nagiosxi nagiosxi 127.
nagios    9497  3529  0 Apr20 ?        00:00:03 /usr/local/nagios/bin/ndo2db -c
nagios    9498  9497  0 Apr20 ?        00:00:34 /usr/local/nagios/bin/ndo2db -c
nagios    9501     1  0 Apr20 ?        00:01:08 /usr/local/nagios/bin/nagios -d
apache   21344  3470  0 Apr22 ?        00:13:50 /usr/sbin/httpd
apache   21345  3470  0 Apr22 ?        00:13:46 /usr/sbin/httpd
apache   21346  3470  0 Apr22 ?        00:13:30 /usr/sbin/httpd
postgres 21389 22548  0 Apr22 ?        00:00:11 postgres: nagiosxi nagiosxi 127.
postgres 21537 22548  0 Apr22 ?        00:00:12 postgres: nagiosxi nagiosxi 127.
postgres 21692 22548  0 Apr22 ?        00:00:12 postgres: nagiosxi nagiosxi 127.
apache   21802  3470  0 13:51 ?        00:00:33 /usr/sbin/httpd
postgres 21870 22548  0 13:51 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres 22548     1  0 Apr18 ?        00:00:14 /usr/bin/postmaster -p 5432 -D /
postgres 22554 22548  0 Apr18 ?        00:00:00 postgres: logger process
postgres 22556 22548  0 Apr18 ?        00:00:04 postgres: writer process
postgres 22557 22548  0 Apr18 ?        00:00:03 postgres: stats buffer process
postgres 22558 22557  0 Apr18 ?        00:00:02 postgres: stats collector proces
apache   22974  3470  0 13:55 ?        00:00:31 /usr/sbin/httpd
postgres 23069 22548  0 13:55 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
apache   25505  3470  0 14:04 ?        00:00:19 /usr/sbin/httpd
postgres 25591 22548  0 14:04 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
apache   29184  3470  0 14:22 ?        00:00:10 /usr/sbin/httpd
apache   29185  3470  0 14:22 ?        00:00:10 /usr/sbin/httpd
apache   29186  3470  0 14:22 ?        00:00:10 /usr/sbin/httpd
postgres 29694 22548  0 14:24 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres 29712 22548  0 14:24 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
postgres 29714 22548  0 14:24 ?        00:00:00 postgres: nagiosxi nagiosxi 127.
Thanks.

Re: Have to Restart Nagios VM Periodically

Posted: Wed Apr 24, 2013 4:34 pm
by abrist
It looks like postgres is running correctly now. Are you still having issues?
If so, lets look at the postgres log one more time:

Code: Select all

tail -100 /var/lib/pgsql/pgstartup.log