postgresql
postgresql
hello
my Nagios PostgreSQL wont start
# service postgresql restart
Stopping postgresql service: [FAILED]
Starting postgresql service: [FAILED]
I try vacuum and it give me this
# echo "vacuum;vacuum analyze;"|psql nagiosxi postgres
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
when I check the psql log it show this
# cat /var/lib/pgsql/pgstartup.log
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.
The default text search configuration will be set to "english".
fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... 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/postgres -D /var/lib/pgsql/data
or
/usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start
runuser: cannot set groups: Operation not permitted
please help me what I am missing
my Nagios PostgreSQL wont start
# service postgresql restart
Stopping postgresql service: [FAILED]
Starting postgresql service: [FAILED]
I try vacuum and it give me this
# echo "vacuum;vacuum analyze;"|psql nagiosxi postgres
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
when I check the psql log it show this
# cat /var/lib/pgsql/pgstartup.log
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.
The default text search configuration will be set to "english".
fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... 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/postgres -D /var/lib/pgsql/data
or
/usr/bin/pg_ctl -D /var/lib/pgsql/data -l logfile start
runuser: cannot set groups: Operation not permitted
please help me what I am missing
Re: postgresql
Is this a Nagios Core installation, or a Nagios XI installation? Which version are you using?
Can you share the outputs of:
Can you share the outputs of:
Code: Select all
service postgresql status
ps aux
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: postgresql
Code: Select all
service postgresql status
postmaster is stopped
ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 19364 1536 ? Ss Apr04 0:01 /sbin/init
root 2 0.0 0.0 0 0 ? S Apr04 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S Apr04 0:10 [migration/0]
root 4 0.0 0.0 0 0 ? S Apr04 0:02 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S Apr04 0:00 [stopper/0]
root 6 0.0 0.0 0 0 ? S Apr04 0:00 [watchdog/0]
root 7 0.0 0.0 0 0 ? S Apr04 0:04 [migration/1]
root 8 0.0 0.0 0 0 ? S Apr04 0:00 [stopper/1]
root 9 0.0 0.0 0 0 ? S Apr04 0:00 [ksoftirqd/1]
root 10 0.0 0.0 0 0 ? S Apr04 0:00 [watchdog/1]
root 11 0.0 0.0 0 0 ? S Apr04 0:04 [migration/2]
root 12 0.0 0.0 0 0 ? S Apr04 0:00 [stopper/2]
root 13 0.0 0.0 0 0 ? S Apr04 0:00 [ksoftirqd/2]
root 14 0.0 0.0 0 0 ? S Apr04 0:00 [watchdog/2]
root 15 0.0 0.0 0 0 ? S Apr04 0:05 [migration/3]
root 16 0.0 0.0 0 0 ? S Apr04 0:00 [stopper/3]
root 17 0.0 0.0 0 0 ? S Apr04 0:02 [ksoftirqd/3]
root 18 0.0 0.0 0 0 ? S Apr04 0:01 [watchdog/3]
root 19 0.0 0.0 0 0 ? S Apr04 0:04 [events/0]
root 20 0.0 0.0 0 0 ? S Apr04 0:01 [events/1]
root 21 0.0 0.0 0 0 ? S Apr04 0:01 [events/2]
root 22 0.0 0.0 0 0 ? S Apr04 0:05 [events/3]
root 23 0.0 0.0 0 0 ? S Apr04 0:00 [cgroup]
root 24 0.0 0.0 0 0 ? S Apr04 0:00 [khelper]
root 25 0.0 0.0 0 0 ? S Apr04 0:00 [netns]
root 26 0.0 0.0 0 0 ? S Apr04 0:00 [async/mgr]
root 27 0.0 0.0 0 0 ? S Apr04 0:00 [pm]
root 28 0.0 0.0 0 0 ? S Apr04 0:00 [sync_supers]
root 29 0.0 0.0 0 0 ? S Apr04 0:00 [bdi-default]
root 30 0.0 0.0 0 0 ? S Apr04 0:00 [kintegrityd/0]
root 31 0.0 0.0 0 0 ? S Apr04 0:00 [kintegrityd/1]
root 32 0.0 0.0 0 0 ? S Apr04 0:00 [kintegrityd/2]
root 33 0.0 0.0 0 0 ? S Apr04 0:00 [kintegrityd/3]
root 34 0.0 0.0 0 0 ? S Apr04 0:26 [kblockd/0]
root 35 0.0 0.0 0 0 ? S Apr04 0:07 [kblockd/1]
root 36 0.0 0.0 0 0 ? S Apr04 0:17 [kblockd/2]
root 37 0.0 0.0 0 0 ? S Apr04 0:16 [kblockd/3]
root 38 0.0 0.0 0 0 ? S Apr04 0:00 [kacpid]
root 39 0.0 0.0 0 0 ? S Apr04 0:00 [kacpi_notify]
root 40 0.0 0.0 0 0 ? S Apr04 0:00 [kacpi_hotplug]
root 41 0.0 0.0 0 0 ? S Apr04 0:00 [ata_aux]
root 42 0.0 0.0 0 0 ? S Apr04 0:00 [ata_sff/0]
root 43 0.0 0.0 0 0 ? S Apr04 0:00 [ata_sff/1]
root 44 0.0 0.0 0 0 ? S Apr04 0:00 [ata_sff/2]
root 45 0.0 0.0 0 0 ? S Apr04 0:00 [ata_sff/3]
root 46 0.0 0.0 0 0 ? S Apr04 0:00 [ksuspend_usbd]
root 47 0.0 0.0 0 0 ? S Apr04 0:00 [khubd]
root 48 0.0 0.0 0 0 ? S Apr04 0:00 [kseriod]
root 49 0.0 0.0 0 0 ? S Apr04 0:00 [md/0]
root 50 0.0 0.0 0 0 ? S Apr04 0:00 [md/1]
root 51 0.0 0.0 0 0 ? S Apr04 0:00 [md/2]
root 52 0.0 0.0 0 0 ? S Apr04 0:00 [md/3]
root 53 0.0 0.0 0 0 ? S Apr04 0:00 [md_misc/0]
root 54 0.0 0.0 0 0 ? S Apr04 0:00 [md_misc/1]
root 55 0.0 0.0 0 0 ? S Apr04 0:00 [md_misc/2]
root 56 0.0 0.0 0 0 ? S Apr04 0:00 [md_misc/3]
root 57 0.0 0.0 0 0 ? S Apr04 0:00 [linkwatch]
root 59 0.0 0.0 0 0 ? S Apr04 0:00 [khungtaskd]
root 60 0.0 0.0 0 0 ? S Apr04 0:00 [kswapd0]
root 61 0.0 0.0 0 0 ? SN Apr04 0:00 [ksmd]
root 62 0.0 0.0 0 0 ? SN Apr04 0:00 [khugepaged]
root 63 0.0 0.0 0 0 ? S Apr04 0:00 [aio/0]
root 64 0.0 0.0 0 0 ? S Apr04 0:00 [aio/1]
root 65 0.0 0.0 0 0 ? S Apr04 0:00 [aio/2]
root 66 0.0 0.0 0 0 ? S Apr04 0:00 [aio/3]
root 67 0.0 0.0 0 0 ? S Apr04 0:00 [crypto/0]
root 68 0.0 0.0 0 0 ? S Apr04 0:00 [crypto/1]
root 69 0.0 0.0 0 0 ? S Apr04 0:00 [crypto/2]
root 70 0.0 0.0 0 0 ? S Apr04 0:00 [crypto/3]
root 78 0.0 0.0 0 0 ? S Apr04 0:00 [kthrotld/0]
root 79 0.0 0.0 0 0 ? S Apr04 0:00 [kthrotld/1]
root 80 0.0 0.0 0 0 ? S Apr04 0:00 [kthrotld/2]
root 81 0.0 0.0 0 0 ? S Apr04 0:00 [kthrotld/3]
root 82 0.0 0.0 0 0 ? S Apr04 0:00 [pciehpd]
root 84 0.0 0.0 0 0 ? S Apr04 0:00 [kpsmoused]
root 85 0.0 0.0 0 0 ? S Apr04 0:00 [usbhid_resume]
root 86 0.0 0.0 0 0 ? S Apr04 0:00 [deferwq]
root 118 0.0 0.0 0 0 ? S Apr04 0:00 [kdmremove]
root 119 0.0 0.0 0 0 ? S Apr04 0:00 [kstriped]
root 202 0.0 0.0 0 0 ? S Apr04 0:00 [scsi_eh_0]
root 203 0.0 0.0 0 0 ? S Apr04 0:00 [scsi_eh_1]
root 216 0.0 0.0 0 0 ? S Apr04 0:00 [scsi_eh_2]
root 217 0.0 0.0 0 0 ? S Apr04 0:00 [vmw_pvscsi_wq]
root 344 0.0 0.0 0 0 ? S Apr04 0:00 [kdmflush]
root 346 0.0 0.0 0 0 ? S Apr04 0:00 [kdmflush]
root 363 0.0 0.0 0 0 ? S Apr04 0:47 [jbd2/dm-0-8]
root 364 0.0 0.0 0 0 ? S Apr04 0:00 [ext4-dio-unwr]
root 456 0.0 0.0 10920 1020 ? S<s Apr04 0:00 /sbin/udevd -d
root 792 0.0 0.0 0 0 ? S Apr04 0:00 [vmmemctl]
root 1001 0.0 0.0 0 0 ? S Apr04 0:00 [jbd2/sda1-8]
root 1002 0.0 0.0 0 0 ? S Apr04 0:00 [ext4-dio-unwr]
root 1051 0.0 0.0 0 0 ? S Apr04 0:01 [kauditd]
root 1130 0.3 0.0 0 0 ? S Apr04 2:46 [flush-253:0]
root 1280 0.0 0.0 179336 4348 ? S Apr04 0:26 /usr/sbin/vmtoo
root 1563 0.0 0.0 93156 904 ? S<sl Apr04 0:08 auditd
root 1565 0.0 0.0 82036 988 ? S<sl Apr04 0:02 /sbin/audispd
root 1567 0.0 0.0 21256 860 ? S< Apr04 0:00 /usr/sbin/sedis
root 1595 0.0 0.0 249092 2684 ? Sl Apr04 0:01 /sbin/rsyslogd
root 1625 0.0 0.0 10828 644 ? Ss Apr04 0:08 irqbalance --pi
rpc 1646 0.0 0.0 18976 896 ? Ss Apr04 0:00 rpcbind
root 1753 0.0 0.0 13584 748 ? Ss Apr04 0:02 lldpad -d
root 1922 0.0 0.0 0 0 ? S Apr04 0:00 [scsi_tgtd/0]
root 1923 0.0 0.0 0 0 ? S Apr04 0:00 [scsi_tgtd/1]
root 1924 0.0 0.0 0 0 ? S Apr04 0:00 [scsi_tgtd/2]
root 1925 0.0 0.0 0 0 ? S Apr04 0:00 [scsi_tgtd/3]
root 1928 0.0 0.0 0 0 ? S Apr04 0:00 [fc_exch_workq]
root 1929 0.0 0.0 0 0 ? S Apr04 0:00 [fc_rport_eq]
root 1932 0.0 0.0 0 0 ? S Apr04 0:00 [fcoe_work/0]
root 1933 0.0 0.0 0 0 ? S Apr04 0:00 [fcoe_work/1]
root 1934 0.0 0.0 0 0 ? S Apr04 0:00 [fcoe_work/2]
root 1935 0.0 0.0 0 0 ? S Apr04 0:00 [fcoe_work/3]
root 1936 0.0 0.0 0 0 ? S< Apr04 0:00 [fcoethread/0]
root 1937 0.0 0.0 0 0 ? S< Apr04 0:00 [fcoethread/1]
root 1938 0.0 0.0 0 0 ? S< Apr04 0:00 [fcoethread/2]
root 1939 0.0 0.0 0 0 ? S< Apr04 0:00 [fcoethread/3]
root 1940 0.0 0.0 0 0 ? S Apr04 0:00 [cnic_wq]
root 1941 0.0 0.0 0 0 ? S Apr04 0:00 [bnx2fc]
root 1942 0.0 0.0 0 0 ? S< Apr04 0:00 [bnx2fc_l2_thr]
root 1943 0.0 0.0 0 0 ? S< Apr04 0:00 [bnx2fc_thread]
root 1944 0.0 0.0 0 0 ? S< Apr04 0:00 [bnx2fc_thread]
root 1945 0.0 0.0 0 0 ? S< Apr04 0:00 [bnx2fc_thread]
root 1946 0.0 0.0 0 0 ? S< Apr04 0:00 [bnx2fc_thread]
root 1950 0.0 0.0 8364 404 ? Ss Apr04 0:00 /usr/sbin/fcoem
dbus 1963 0.0 0.0 21820 1504 ? Ss Apr04 0:00 dbus-daemon --s
root 1995 0.5 0.0 4904 880 ? S Apr04 5:03 /opt/Symantec/s
root 2009 0.0 0.0 82884 4508 ? Ss Apr04 0:01 NetworkManager
root 2013 0.0 0.0 58136 2428 ? S Apr04 0:00 /usr/sbin/modem
rpcuser 2030 0.0 0.0 23348 1364 ? Ss Apr04 0:00 rpc.statd
root 2059 0.0 0.0 188932 3348 ? Ss Apr04 0:00 cupsd -C /etc/c
root 2097 0.0 0.0 44988 688 ? Ss Apr04 0:00 /usr/sbin/wpa_s
root 2109 0.0 0.0 4080 648 ? Ss Apr04 0:00 /usr/sbin/acpid
68 2124 0.0 0.0 39056 3816 ? Ssl Apr04 0:00 hald
root 2125 0.0 0.0 20400 1156 ? S Apr04 0:00 hald-runner
root 2170 0.0 0.0 22520 1084 ? S Apr04 0:00 hald-addon-inpu
68 2176 0.0 0.0 18008 1032 ? S Apr04 0:00 hald-addon-acpi
root 2194 0.0 0.0 386136 1912 ? Ssl Apr04 0:00 automount --pid
root 2216 0.0 0.0 6260 296 ? Ss Apr04 0:00 /usr/sbin/mcelo
root 2231 0.0 0.0 66216 1220 ? Ss Apr04 0:00 /usr/sbin/sshd
root 2240 0.0 0.0 21716 1028 ? Ss Apr04 0:00 xinetd -stayali
ntp 2249 0.0 0.0 30732 2104 ? Ss Apr04 0:00 ntpd -u ntp:ntp
root 2284 0.0 0.0 108204 1444 ? S Apr04 0:00 /bin/sh /usr/bi
mysql 2386 0.8 0.2 443312 34736 ? Sl Apr04 7:31 /usr/libexec/my
root 2520 0.0 0.0 80856 3404 ? Ss Apr04 0:00 /usr/libexec/po
postfix 2534 0.0 0.0 81108 3552 ? S Apr04 0:00 qmgr -l -t fifo
root 2545 0.0 0.0 114644 1116 ? Ss Apr04 0:00 /usr/sbin/abrtd
root 2553 0.0 0.0 112524 928 ? Ss Apr04 0:00 abrt-dump-oops
root 2562 0.0 0.0 346020 14220 ? Ss Apr04 0:01 /usr/sbin/httpd
root 2572 0.0 0.0 116860 1268 ? Ss Apr04 0:01 crond
nagios 2582 0.0 0.0 8340 836 ? S Apr04 0:00 /usr/local/nagi
root 2594 0.0 0.0 21104 476 ? Ss Apr04 0:00 /usr/sbin/atd
root 2618 0.0 0.0 100928 636 ? Ss Apr04 0:00 rhnsd
root 2627 0.0 0.0 108340 656 ? Ss Apr04 0:00 /usr/bin/rhsmce
root 2651 5.8 1.8 322236 300384 ? Sl Apr04 52:27 /opt/Symantec/s
root 2683 0.2 0.1 130480 20544 ? Sl Apr04 2:07 /opt/Symantec/s
apache 2704 0.0 0.0 345932 7768 ? S Apr04 0:00 /usr/sbin/httpd
apache 2705 0.0 0.1 354924 19012 ? S Apr04 0:00 /usr/sbin/httpd
apache 2706 0.0 0.1 354924 19004 ? S Apr04 0:00 /usr/sbin/httpd
apache 2707 0.0 0.0 346784 9440 ? S Apr04 0:00 /usr/sbin/httpd
apache 2708 0.0 0.0 346784 9428 ? S Apr04 0:00 /usr/sbin/httpd
apache 2709 0.0 0.0 346784 9428 ? S Apr04 0:00 /usr/sbin/httpd
apache 2710 0.0 0.0 346784 9428 ? S Apr04 0:00 /usr/sbin/httpd
apache 2711 0.0 0.0 346784 9428 ? S Apr04 0:00 /usr/sbin/httpd
apache 2712 0.0 0.0 350580 14356 ? S Apr04 0:00 /usr/sbin/httpd
ajaxterm 2716 0.0 0.0 170344 7668 ? Sl Apr04 0:11 python /usr/sha
root 2731 0.0 0.0 64232 1208 ? Ss Apr04 0:00 /usr/sbin/certm
nagios 2779 0.2 0.0 24892 8068 ? Ss Apr04 2:16 /usr/local/nagi
nagios 2786 0.0 0.0 10016 936 ? S Apr04 0:12 /usr/local/nagi
nagios 2787 0.0 0.0 10016 932 ? S Apr04 0:11 /usr/local/nagi
nagios 2788 0.0 0.0 10016 928 ? S Apr04 0:12 /usr/local/nagi
nagios 2789 0.0 0.0 10016 932 ? S Apr04 0:12 /usr/local/nagi
nagios 2790 0.0 0.0 10016 932 ? S Apr04 0:12 /usr/local/nagi
nagios 2791 0.0 0.0 10016 936 ? S Apr04 0:11 /usr/local/nagi
nagios 2815 0.0 0.0 49824 620 ? Ss Apr04 0:00 /usr/local/nagi
nagios 2850 0.0 0.0 24156 2808 ? S Apr04 0:01 /usr/local/nagi
root 2852 0.0 0.0 8704 3084 ? S Apr04 0:00 /usr/netvault/b
root 2862 0.0 0.0 6984 2120 ? S Apr04 0:00 nvcmgr 2
root 2876 0.0 0.0 6240 532 ? S Apr04 0:00 /var/ossec/bin/
ossec 2881 0.0 0.0 6516 920 ? S Apr04 0:03 /var/ossec/bin/
root 2886 0.0 0.0 4300 616 ? S Apr04 0:00 /var/ossec/bin/
root 2890 0.0 0.0 5496 2136 ? S Apr04 0:16 /var/ossec/bin/
root 2907 0.0 0.0 7104 2320 ? S Apr04 0:00 nvnmgr 3
root 2908 0.0 0.0 9040 3468 ? S Apr04 0:00 nvstatsmngr 9
root 2941 0.0 0.0 6964 2116 ? S Apr04 0:00 nvconsolesvc 15
root 3084 0.0 0.0 134008 2144 ? Ssl Apr04 0:00 /usr/sbin/gdm-b
root 3089 0.0 0.0 4064 552 tty2 Ss+ Apr04 0:00 /sbin/mingetty
root 3091 0.0 0.0 4064 548 tty3 Ss+ Apr04 0:00 /sbin/mingetty
root 3093 0.0 0.0 4064 548 tty4 Ss+ Apr04 0:00 /sbin/mingetty
root 3095 0.0 0.0 4064 552 tty5 Ss+ Apr04 0:00 /sbin/mingetty
root 3099 0.0 0.0 4064 552 tty6 Ss+ Apr04 0:00 /sbin/mingetty
root 3100 0.0 0.0 10916 992 ? S< Apr04 0:00 /sbin/udevd -d
root 3101 0.0 0.0 10916 992 ? S< Apr04 0:00 /sbin/udevd -d
root 3119 0.0 0.0 164632 3060 ? Sl Apr04 0:00 /usr/libexec/gd
root 3122 0.0 0.2 151152 33804 tty1 Ss+ Apr04 0:02 /usr/bin/Xorg :
root 3336 0.0 0.0 2085036 3320 ? Sl Apr04 0:00 /usr/sbin/conso
gdm 3536 0.0 0.0 20040 652 ? S Apr04 0:00 /usr/bin/dbus-l
gdm 3537 0.0 0.0 21564 968 ? Ss Apr04 0:00 /bin/dbus-daemo
gdm 3538 0.0 0.0 269052 7868 ? Ssl Apr04 0:00 /usr/bin/gnome-
root 3604 0.0 0.0 50004 2636 ? S Apr04 0:00 /usr/libexec/de
gdm 3608 0.0 0.0 133280 5244 ? S Apr04 0:00 /usr/libexec/gc
gdm 3630 0.0 0.0 120712 4396 ? S Apr04 0:00 /usr/libexec/at
gdm 3631 0.0 0.0 350828 12828 ? Ssl Apr04 0:21 /usr/libexec/gn
gdm 3633 0.0 0.0 358552 4996 ? Ssl Apr04 0:00 /usr/libexec/bo
gdm 3834 0.0 0.0 135284 1864 ? S Apr04 0:00 /usr/libexec/gv
gdm 3877 0.0 0.0 288956 9956 ? S Apr04 0:00 metacity
gdm 3878 0.0 0.0 289528 12296 ? S Apr04 0:00 plymouth-log-vi
gdm 3879 0.0 0.0 248296 7396 ? S Apr04 0:00 /usr/libexec/po
gdm 3880 0.0 0.0 384456 16016 ? S Apr04 0:02 /usr/libexec/gd
gdm 3882 0.0 0.0 273704 8660 ? S Apr04 0:00 gnome-power-man
root 3884 0.0 0.0 52668 4448 ? S Apr04 0:00 /usr/libexec/po
gdm 3993 0.0 0.0 345728 2828 ? S<sl Apr04 0:00 /usr/bin/pulsea
rtkit 3995 0.0 0.0 168456 1184 ? SNl Apr04 0:01 /usr/libexec/rt
root 4074 0.0 0.0 141776 2052 ? S Apr04 0:00 pam: gdm-passwo
nagios 4483 0.0 0.0 49824 1432 ? S Apr04 0:17 /usr/local/nagi
nagios 4484 0.2 0.0 50236 1892 ? S Apr04 2:28 /usr/local/nagi
postfix 18800 0.0 0.0 80936 3420 ? S 07:42 0:00 pickup -l -t fi
postfix 26809 0.0 0.0 81080 3532 ? S 08:46 0:00 cleanup -z -t u
postfix 26811 0.0 0.0 81232 4108 ? S 08:46 0:00 local -t unix
postfix 26812 0.0 0.0 80972 3456 ? S 08:46 0:00 bounce -z -t un
root 28077 0.0 0.0 102500 4756 ? Ss 08:46 0:00 sshd: root@pts/
root 28566 0.0 0.0 108340 1820 pts/0 Ss 08:46 0:00 -bash
nagios 30146 0.0 0.0 37244 2088 ? S 08:47 0:00 /usr/local/nagi
nagios 30428 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30429 0.0 0.0 109484 808 ? S 08:47 0:00 /usr/local/nagi
nagios 30472 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30473 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
nagios 30475 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30476 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30479 0.0 0.0 109480 760 ? S 08:47 0:00 /usr/local/nagi
nagios 30480 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
nagios 30481 0.0 0.0 109484 932 ? S 08:47 0:00 /usr/local/nagi
nagios 30524 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
nagios 30531 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
nagios 30572 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
nagios 30573 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
nagios 30617 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30660 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30703 0.0 0.0 109480 760 ? S 08:47 0:00 /usr/local/nagi
nagios 30706 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
nagios 30708 2.3 0.0 144884 10812 ? S 08:47 0:00 /usr/bin/perl -
nagios 30709 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30712 0.0 0.0 37244 2088 ? S 08:47 0:00 /usr/local/nagi
nagios 30715 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30716 0.0 0.0 109480 756 ? S 08:47 0:00 /usr/local/nagi
nagios 30717 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
nagios 30718 8.0 0.0 144884 10812 ? S 08:47 0:00 /usr/bin/perl -
nagios 30719 0.0 0.0 109480 752 ? S 08:47 0:00 /usr/local/nagi
root 30762 0.0 0.0 110236 1128 pts/0 R+ 08:47 0:00 ps aux
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Last edited by mcapra on Thu Apr 06, 2017 11:18 am, edited 1 time in total.
Reason: please use [code] tags for technical output
Reason: please use [code] tags for technical output
Re: postgresql
More Info
When I do Vacuum I get this error -
Please help me as I try most of the guide that I can find
Code: Select all
[root@JLDTBVMIF08 scripts]# tail /var/log/mysqld.log
170405 15:02:54 [Note] /usr/libexec/mysqld: Shutdown complete
170405 15:02:54 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170405 15:06:00 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
170405 15:06:00 InnoDB: Initializing buffer pool, size = 8.0M
170405 15:06:00 InnoDB: Completed initialization of buffer pool
170405 15:06:00 InnoDB: Started; log sequence number 0 44243
170405 15:06:00 [Note] Event Scheduler: Loaded 0 events
170405 15:06:00 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
[root@JLDTBVMIF08 scripts]# service postgresql start
Starting postgresql service: [FAILED]
Code: Select all
# postgres -V
postgres (PostgreSQL) 8.4.20
]# echo "vacuum;vacuum analyze;"|psql nagiosxi postgres
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
# su postgres
bash-4.1$ echo "VACUUM;" > /tmp/fix.sql
bash-4.1$ postgres --single -D /var/lib/pgsql/data nagiosxi < /tmp/fix.sql
PANIC: could not locate a valid checkpoint record
Aborted (core dumped)
bash-4.1$ postgres --single -D /var/lib/pgsql/data postgres < /tmp/fix.sql
PANIC: could not locate a valid checkpoint record
Aborted (core dumped)
bash-4.1$
Re: postgresql
Can you please answer this question as the answer is not immediately clear from your responses:
I'd also like to know why the mysqld log was shared when your questions are regarding postgresql. We really would need to see the postgresql log to begin to troubleshoot why the VACUUM is failing.
Based on this output, it doesn't look like there's a postgresql server running:
But we would need to see the postgresql logs to verify that. If you don't have postgresql logs, you can enable them in the following configuration file:
Otherwise, the log files are typically located here:
It looks like you might be using Nagios XI. Can you tell me which version of Nagios XI you are using if this is the case?mcapra wrote:Is this a Nagios Core installation, or a Nagios XI installation? Which version are you using?
I'd also like to know why the mysqld log was shared when your questions are regarding postgresql. We really would need to see the postgresql log to begin to troubleshoot why the VACUUM is failing.
Based on this output, it doesn't look like there's a postgresql server running:
Code: Select all
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Code: Select all
/var/lib/pgsql/data/postgresql.conf
Code: Select all
/var/lib/pgsql/data/pg_log
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: postgresql
I am using Nagiosxi
Code: Select all
# cat /var/lib/pgsql/data/postgresql.conf
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
# values can be found in the PostgreSQL documentation.
#
# The commented-out settings shown in this file represent the default values.
# Re-commenting a setting is NOT sufficient to revert it to the default value;
# you need to reload the server.
#
# This file is read on server startup and when the server receives a SIGHUP
# signal. If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, or use "pg_ctl reload". Some
# parameters, which are marked below, require a server shutdown and restart to
# take effect.
#
# Any parameter can also be given as a command-line option to the server, e.g.,
# "postgres -c log_connections=on". Some parameters can be changed at run time
# with the "SET" SQL command.
#
# Memory units: kB = kilobytes Time units: ms = milliseconds
# MB = megabytes s = seconds
# GB = gigabytes min = minutes
# h = hours
# d = days
#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------
# The default values of these variables are driven from the -D command-line
# option or PGDATA environment variable, represented here as ConfigDir.
#data_directory = 'ConfigDir' # use data in another directory
# (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
# (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = '(none)' # write an extra PID file
# (change requires restart)
#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------
# - Connection Settings -
#listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
#port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
# Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directory = '' # (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
# (change requires restart)
# - Security and Authentication -
#authentication_timeout = 1min # 1s-600s
#ssl = off # (change requires restart)
#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers
# (change requires restart)
#ssl_renegotiation_limit = 512MB # amount of data between renegotiations
#password_encryption = on
#db_user_namespace = off
# Kerberos and GSSAPI
#krb_server_keyfile = ''
#krb_srvname = 'postgres' # (Kerberos only)
#krb_caseins_users = off
# - TCP Keepalives -
# see "man 7 tcp" for details
#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
# 0 selects the system default
#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
# 0 selects the system default
#tcp_keepalives_count = 0 # TCP_KEEPCNT;
# 0 selects the system default
#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------
# - Memory -
shared_buffers = 32MB # min 128kB
# (change requires restart)
#temp_buffers = 8MB # min 800kB
#max_prepared_transactions = 0 # zero disables the feature
# (change requires restart)
# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
# per transaction slot, plus lock space (see max_locks_per_transaction).
# It is not advisable to set max_prepared_transactions nonzero unless you
# actively intend to use prepared transactions.
#work_mem = 1MB # min 64kB
#maintenance_work_mem = 16MB # min 1MB
#max_stack_depth = 2MB # min 100kB
# - Kernel Resource Usage -
#max_files_per_process = 1000 # min 25
# (change requires restart)
#shared_preload_libraries = '' # (change requires restart)
# - Cost-Based Vacuum Delay -
#vacuum_cost_delay = 0ms # 0-100 milliseconds
#vacuum_cost_page_hit = 1 # 0-10000 credits
#vacuum_cost_page_miss = 10 # 0-10000 credits
#vacuum_cost_page_dirty = 20 # 0-10000 credits
#vacuum_cost_limit = 200 # 1-10000 credits
# - Background Writer -
#bgwriter_delay = 200ms # 10-10000ms between rounds
#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/ro und
# - Asynchronous Behavior -
#effective_io_concurrency = 1 # 1-1000. 0 disables prefetching
#------------------------------------------------------------------------------
# WRITE AHEAD LOG
#------------------------------------------------------------------------------
# - Settings -
#fsync = on # turns forced synchronization on or off
#synchronous_commit = on # immediate fsync at commit
#wal_sync_method = fsync # the default is the first option
# supported by the operating system:
# open_datasync
# fdatasync (default on Linux)
# fsync
# fsync_writethrough
# open_sync
#full_page_writes = on # recover from partial page writes
#wal_buffers = 64kB # min 32kB
# (change requires restart)
#wal_writer_delay = 200ms # 1-10000 milliseconds
#commit_delay = 0 # range 0-100000, in microseconds
#commit_siblings = 5 # range 1-1000
# - Checkpoints -
#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
#checkpoint_timeout = 5min # range 30s-1h
#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
#checkpoint_warning = 30s # 0 disables
# - Archiving -
#archive_mode = off # allows archiving to be done
# (change requires restart)
#archive_command = '' # command to use to archive a logfile segment
#archive_timeout = 0 # force a logfile segment switch after this
# number of seconds; 0 disables
#------------------------------------------------------------------------------
# QUERY TUNING
#------------------------------------------------------------------------------
# - Planner Method Configuration -
#enable_bitmapscan = on
#enable_hashagg = on
#enable_hashjoin = on
#enable_indexscan = on
#enable_mergejoin = on
#enable_nestloop = on
#enable_seqscan = on
#enable_sort = on
#enable_tidscan = on
# - Planner Cost Constants -
#seq_page_cost = 1.0 # measured on an arbitrary scale
#random_page_cost = 4.0 # same scale as above
#cpu_tuple_cost = 0.01 # same scale as above
#cpu_index_tuple_cost = 0.005 # same scale as above
#cpu_operator_cost = 0.0025 # same scale as above
#effective_cache_size = 128MB
# - Genetic Query Optimizer -
#geqo = on
#geqo_threshold = 12
#geqo_effort = 5 # range 1-10
#geqo_pool_size = 0 # selects default based on effort
#geqo_generations = 0 # selects default based on effort
#geqo_selection_bias = 2.0 # range 1.5-2.0
# - Other Planner Options -
#default_statistics_target = 100 # range 1-10000
#constraint_exclusion = partition # on, off, or partition
#cursor_tuple_fraction = 0.1 # range 0.0-1.0
#from_collapse_limit = 8
#join_collapse_limit = 8 # 1 disables collapsing of explicit
# JOIN clauses
#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------
# - Where to Log -
#log_destination = 'stderr' # Valid values are combinations of
# stderr, csvlog, syslog and eventlog,
# depending on platform. csvlog
# requires logging_collector to be on.
# This is used when logging to stderr:
logging_collector = on # Enable capturing of stderr and csvlog
# into log files. Required to be on for
# csvlogs.
# (change requires restart)
# These are only used if logging_collector is on:
log_directory = 'pg_log' # directory where log files are written,
# can be absolute or relative to PGDATA
log_filename = 'postgresql-%a.log' # log file name pattern,
# can include strftime() escapes
log_truncate_on_rotation = on # If on, an existing log file of the
# same name as the new log file will be
# truncated rather than appended to.
# But such truncation only occurs on
# time-driven rotation, not on restarts
# or size-driven rotation. Default is
# off, meaning append to existing files
# in all cases.
log_rotation_age = 1d # Automatic rotation of logfiles will
# happen after that time. 0 disables.
log_rotation_size = 0 # Automatic rotation of logfiles will
# happen after that much log output.
# 0 disables.
# These are relevant when logging to syslog:
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'
#silent_mode = off # Run server silently.
# DO NOT USE without syslog or
# logging_collector
# (change requires restart)
# - When to Log -
#client_min_messages = notice # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# log
# notice
# warning
# error
#log_min_messages = warning # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic
#log_error_verbosity = default # terse, default, or verbose messages
#log_min_error_statement = error # values in order of decreasing detail:
# debug5
# debug4
# debug3
# debug2
# debug1
# info
# notice
# warning
# error
# log
# fatal
# panic (effectively off)
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
# and their durations, > 0 logs only
# statements running at least this numbe r
# of milliseconds
# - What to Log -
#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_hostname = off
#log_line_prefix = '' # special values:
# %u = user name
# %d = database name
# %r = remote host and port
# %h = remote host
# %p = process ID
# %t = timestamp without milliseconds
# %m = timestamp with milliseconds
# %i = command tag
# %c = session ID
# %l = session line number
# %s = session start timestamp
# %v = virtual transaction ID
# %x = transaction ID (0 if none)
# %q = stop here in non-session
# processes
# %% = '%'
# e.g. '<%u%%%d> '
#log_lock_waits = off # log lock waits >= deadlock_timeout
#log_statement = 'none' # none, ddl, mod, all
#log_temp_files = -1 # log temporary files equal or larger
# than the specified size in kilobytes;
# -1 disables, 0 logs all temp files
#log_timezone = unknown # actually, defaults to TZ environment
# setting
#------------------------------------------------------------------------------
# RUNTIME STATISTICS
#------------------------------------------------------------------------------
# - Query/Index Statistics Collector -
#track_activities = on
#track_counts = on
#track_functions = none # none, pl, all
#track_activity_query_size = 1024
#update_process_title = on
#stats_temp_directory = 'pg_stat_tmp'
# - Statistics Monitoring -
#log_parser_stats = off
#log_planner_stats = off
#log_executor_stats = off
#log_statement_stats = off
#------------------------------------------------------------------------------
# AUTOVACUUM PARAMETERS
#------------------------------------------------------------------------------
#autovacuum = on # Enable autovacuum subprocess? 'on'
# requires track_counts to also be on.
#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
# their durations, > 0 logs only
# actions running at least this number
# of milliseconds.
#autovacuum_max_workers = 3 # max number of autovacuum subprocesses
#autovacuum_naptime = 1min # time between autovacuum runs
#autovacuum_vacuum_threshold = 50 # min number of row updates before
# vacuum
#autovacuum_analyze_threshold = 50 # min number of row updates before
# analyze
#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
# (change requires restart)
#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
# autovacuum, in milliseconds;
# -1 means use vacuum_cost_delay
#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
# autovacuum, -1 means use
# vacuum_cost_limit
#------------------------------------------------------------------------------
# CLIENT CONNECTION DEFAULTS
#------------------------------------------------------------------------------
# - Statement Behavior -
#search_path = '"$user",public' # schema names
#default_tablespace = '' # a tablespace name, '' uses the default
#temp_tablespaces = '' # a list of tablespace names, '' uses
# only default tablespace
#check_function_bodies = on
#default_transaction_isolation = 'read committed'
#default_transaction_read_only = off
#session_replication_role = 'origin'
#statement_timeout = 0 # in milliseconds, 0 is disabled
#vacuum_freeze_min_age = 50000000
#vacuum_freeze_table_age = 150000000
#xmlbinary = 'base64'
#xmloption = 'content'
# - Locale and Formatting -
datestyle = 'iso, mdy'
#intervalstyle = 'postgres'
#timezone = unknown # actually, defaults to TZ environment
# setting
#timezone_abbreviations = 'Default' # Select the set of available time zone
# abbreviations. Currently, there are
# Default
# Australia
# India
# You can create your own file in
# share/timezonesets/.
#extra_float_digits = 0 # min -15, max 2
#client_encoding = sql_ascii # actually, defaults to database
# encoding
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'en_US.UTF-8' # locale for system error messag e
# strings
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
lc_numeric = 'en_US.UTF-8' # locale for number formatting
lc_time = 'en_US.UTF-8' # locale for time formatting
# default configuration for text search
default_text_search_config = 'pg_catalog.english'
# - Other Defaults -
#dynamic_library_path = '$libdir'
#local_preload_libraries = ''
#------------------------------------------------------------------------------
# LOCK MANAGEMENT
#------------------------------------------------------------------------------
#deadlock_timeout = 1s
#max_locks_per_transaction = 64 # min 10
# (change requires restart)
# Note: Each lock table slot uses ~270 bytes of shared memory, and there are
# max_locks_per_transaction * (max_connections + max_prepared_transactions)
# lock table slots.
#------------------------------------------------------------------------------
# VERSION/PLATFORM COMPATIBILITY
#------------------------------------------------------------------------------
# - Previous PostgreSQL Versions -
#add_missing_from = off
#array_nulls = on
#backslash_quote = safe_encoding # on, off, or safe_encoding
#default_with_oids = off
#escape_string_warning = on
#regex_flavor = advanced # advanced, extended, or basic
#sql_inheritance = on
#standard_conforming_strings = off
#synchronize_seqscans = on
# - Other Platforms and Clients -
#transform_null_equals = off
#------------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#------------------------------------------------------------------------------
#custom_variable_classes = '' # list of custom variable class names
Last edited by mcapra on Thu Apr 06, 2017 11:17 am, edited 1 time in total.
Reason: please use [code] tags for technical output
Reason: please use [code] tags for technical output
Re: postgresql
Code: Select all
# cd /var/lib/pgsql/data/pg_log
# cat postgresql-Wed.log
ERROR: left link changed unexpectedly in block 9 of index "xi_meta_keyname_idx"
CONTEXT: automatic vacuum of table "nagiosxi.public.xi_meta"
ERROR: left link changed unexpectedly in block 9 of index "xi_meta_keyname_idx"
CONTEXT: automatic vacuum of table "nagiosxi.public.xi_meta"
ERROR: relation "xi_notifications" does not exist
STATEMENT: VACUUM ANALYZE xi_notifications;
LOG: sending cancel to blocking autovacuum PID 11909
DETAIL: Process 13579 waits for ShareUpdateExclusiveLock on relation 16581 of database 16385.
STATEMENT: VACUUM ANALYZE xi_meta;
ERROR: canceling autovacuum task
CONTEXT: automatic vacuum of table "nagiosxi.public.xi_meta"
ERROR: left link changed unexpectedly in block 9 of index "xi_meta_keyname_idx"
STATEMENT: VACUUM ANALYZE xi_meta;
Last edited by mcapra on Thu Apr 06, 2017 11:17 am, edited 1 time in total.
Reason: please use [code] tags for technical output
Reason: please use [code] tags for technical output
Re: postgresql
Which version of Nagios XI are you using? This will help in determining which postgres schema is used as well as pinpoint any bugs that may have been fixed in later versions.
Do you have any recent backups you can restore from? There seems to be some pretty nasty stuff happening within postgres.
Do you have any recent backups you can restore from? There seems to be some pretty nasty stuff happening within postgres.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/