Need some Clarifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Need some Clarifications

Post by haile711 »

To everyone,

Is this normal to have these scripts running under root? My nagios box is running very slow

Code: Select all

[root@ma209dlvmon835 tmp]# ps -ef | grep nagios | grep root
root      6005  6004  0 16:48 ?        00:00:00 /bin/sh /usr/local/nagiosxi/scripts/reset_config_perms.sh
root      8335  8334  0 16:49 ?        00:00:00 /bin/sh /usr/local/nagiosxi/scripts/reset_config_perms.sh
root     12561 12560  0 16:50 ?        00:00:00 /bin/sh /usr/local/nagiosxi/scripts/reset_config_perms.sh
root     12570 12561  1 16:50 ?        00:00:04 /bin/chmod -R 775 /usr/local/nagios/share/perfdata/
root     13692  6005  1 16:50 ?        00:00:04 /bin/chown -R nagios.nagios /usr/local/nagios/share/perfdata
root     15836 15835  0 16:51 ?        00:00:00 /bin/sh /usr/local/nagiosxi/scripts/reset_config_perms.sh
root     15844 15836  1 16:51 ?        00:00:03 /bin/chmod -R 775 /usr/local/nagios/share/perfdata/
root     18971 18970  0 16:52 ?        00:00:00 /bin/sh /usr/local/nagiosxi/scripts/reset_config_perms.sh
root     20197 18971  1 16:52 ?        00:00:02 /bin/chmod -R 775 /usr/local/nagios/share/perfdata/
root     21769 21768  0 16:53 ?        00:00:00 /bin/sh /usr/local/nagiosxi/scripts/reset_config_perms.sh
root     21849 21769  1 16:53 ?        00:00:01 /bin/chmod -R 775 /usr/local/nagios/share/perfdata/
root     24117 24114  0 16:54 ?        00:00:00 /bin/sh /usr/local/nagiosxi/scripts/reset_config_perms.sh
root     24264 24117  1 16:54 ?        00:00:00 /bin/chmod -R 775 /usr/local/nagios/share/perfdata/
root     24381  8335  1 16:54 ?        00:00:00 /bin/chown -R nagios.nagios /usr/local/nagios/share/perfdata
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Need some Clarifications

Post by Box293 »

Can you please run this command and send us the output:

Code: Select all

ps -ef | grep nagios.cfg
Do you have scheduled backups for midnight?
https://support.nagios.com/kb/article.php?id=547
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: Need some Clarifications

Post by haile711 »

Box,

Here is the output from the command

Code: Select all

[root@ma209dlvmon835 tmp]# ps -ef | grep nagios.cfg
root      7134  2811  0 08:54 pts/8    00:00:00 grep nagios.cfg
nagios    7655     1  1 Oct11 ?        00:10:07 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios    7686  7655  0 Oct11 ?        00:00:01 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Thanks
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Need some Clarifications

Post by avandemore »

Can you post the output of grep -i nagios /etc/sudoers?
Previous Nagios employee
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: Need some Clarifications

Post by haile711 »

result from grep command

Code: Select all

[root@ma209dlvmon835 tmp]# grep -i nagios /etc/sudoers
#               Added new entries for nagios:
#               nagios                          CUST_DAL09_NAGSIOS_HOSTS = NOPASSWD: /bin/su - chefsolo
# 2015-11-09    New nagios entries:
#               Defaults:nagios                 !requiretty
#               CUST_DAL09_NAGIOSXI     CUST_DAL09_NAGSIOS_HOSTS = NOPASSWD: /bin/su - chefsolo, \
#                       /usr/local/nagios/libexec/check_init_service, \
#               /usr/local/nagios/libexec/check_linux_stats.pl, \
#               /etc/init.d/nagios start, \
#               /etc/init.d/nagios stop, \
#               /etc/init.d/nagios restart, \
#               /etc/init.d/nagios reload, \
#               /etc/init.d/nagios status, \
#               /etc/init.d/nagios checkconfig, \
#               /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *, \
#               /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh, \
#               /usr/local/nagiosxi/scripts/upgrade_to_latest.sh, \
#               /usr/local/nagiosxi/scripts/change_timezone.sh, \
#               /usr/local/nagiosxi/scripts/manage_services.sh *, \
#               /usr/local/nagiosxi/scripts/reset_config_perms.sh
#               CUST_DAL09_NAGIOSXIWEB  CUST_DAL09_NAGSIOS_HOSTS = NOPASSWD: \
#                       /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *, \
#                       /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh, \
#                       /usr/local/nagiosxi/scripts/repair_databases.sh, \
#                       /usr/local/nagiosxi/scripts/manage_services.sh *
Defaults:nagios                 !requiretty
# Nagios #
User_Alias              CUST_DAL09_NAGIOSXI = nagios
User_Alias              CUST_DAL09_NAGIOSXIWEB = apache
CUST_DAL09_NAGIOSXI     CUST_DAL09_NAGSIOS_HOSTS = NOPASSWD: /bin/su - chefsolo, \
                                /usr/local/nagios/libexec/check_init_service, \
                                /usr/local/nagios/libexec/check_linux_stats.pl, \
                                /etc/init.d/nagios start, \
                                /etc/init.d/nagios stop, \
                                /etc/init.d/nagios restart, \
                                /etc/init.d/nagios reload, \
                                /etc/init.d/nagios status, \
                                /etc/init.d/nagios checkconfig, \
                                /usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *, \
                                /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh, \
                                /usr/local/nagiosxi/scripts/upgrade_to_latest.sh, \
                                /usr/local/nagiosxi/scripts/change_timezone.sh, \
                                /usr/local/nagiosxi/scripts/manage_services.sh *, \
                                /usr/local/nagiosxi/scripts/reset_config_perms.sh
CUST_DAL09_NAGIOSXIWEB  CUST_DAL09_NAGSIOS_HOSTS = NOPASSWD: \
                                /usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *, \
                                /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh, \
                                /usr/local/nagiosxi/scripts/repair_databases.sh, \
                                /usr/local/nagiosxi/scripts/manage_services.sh *
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: Need some Clarifications

Post by haile711 »

Also, im seeing alot of these processes, is this normal? my server is crashing every 30 mins

Code: Select all

nagios   27673 27666  0 13:47 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   27679 27673  0 13:47 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php
nagios   27865 27858  0 13:48 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
nagios   27868 27860  0 13:48 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios   27871 27865  0 13:48 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php
nagios   27872 27868  0 13:48 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php
nagios   27875 27861  0 13:48 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   27877 27875  0 13:48 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php
nagios   28894 28882  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php > /usr/local/nagiosxi/var/dbmaint.log 2>&1
nagios   28895 28883  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php > /usr/local/nagiosxi/var/reportengine.log 2>&1
nagios   28896 28880  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php > /usr/local/nagiosxi/var/deadpool.log 2>&1
root     28897 28893  0 13:50 ?        00:00:00 perl /usr/local/bin/eep-nagios.pl --proxy http://ma209-proxy1.macys.com:3128 flush
nagios   28898 28884  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1
nagios   28902 28896  1 13:50 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php
nagios   28903 28898  0 13:50 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php
nagios   28904 28894  0 13:50 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php
nagios   28905 28889  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
nagios   28907 28895  0 13:50 ?        00:00:00 /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php
nagios   28908 28888  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   28909 28885  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
nagios   28910 28886  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
nagios   28913 28887  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios   28914 28881  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1
nagios   28915 28909  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
nagios   28918 28905  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
nagios   28919 28908  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
nagios   28921 28910  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
nagios   28926 28913  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
nagios   28927 28914  0 13:50 ?        00:00:00 /bin/sh -c /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Need some Clarifications

Post by avandemore »

Can you PM me or another Nagios Support person your profile?

XI > Admin > System Profile
Previous Nagios employee
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: Need some Clarifications

Post by haile711 »

Avandemore,

I'm getting "failed to retrieve zip file"

Thxs
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Need some Clarifications

Post by ssax »

Please run this command as root and see how long it takes or if any errors are outputted:

Code: Select all

/bin/bash -x /usr/local/nagiosxi/scripts/reset_config_perms.sh
Thank you
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: Need some Clarifications

Post by haile711 »

ssax,

This is the current load we are seeing and im running that command you have suggested still not done yet

Code: Select all

16:06:17 up  1:58,  6 users,  load average: 59.40, 38.39, 19.83
Locked