recurring_downtime

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: recurring_downtime

Post by npolovenko »

@onegative, As far as the white screen error goes, I'd recommend increasing the settings in the /etc/php.ini file.
If you send me the existing INI file, I will be able to suggest what to use instead.

I'd also increase the max connection limit in MYSQL.
https://support.nagios.com/kb/article.php?id=513

As far as the profile build error, I'd like to take a look at the sudoers file:

Code: Select all

cat /etc/sudoers
Also, open the console to the Nagios server and run.

Code: Select all

tail -f /var/log/httpd/*error*
And while this command is running try to access the scheduled downtime page and let me know if you see any errors in the console beside that entry in the access log.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: recurring_downtime

Post by npolovenko »

@onegative, I noticed that your Nagios related sudoers entries are in a custom file inside the /etc/sudoers.d/ directory.
But in the main /etc/sudoers file you commented out the includedir statement:

Code: Select all

#includedir /etc/sudoers.d
I'd uncomment this line in the /etc/sudoers file and see if it fixes the issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
onegative
Posts: 173
Joined: Tue Feb 17, 2015 12:06 pm

Re: recurring_downtime

Post by onegative »

@npolovenko

This is a special thing within the sudoers file...it does not mean comment as most people perceive...please observe below...

#includedir /etc/sudoers.d

Other special characters and reserved words: The pound sign (`#') is used to indicate a comment (unless it is part of a #include directive or unless it occurs in the context of a user name and is followed by one or more digits, in which case it is treated as a uid). Both the comment character and any text after it, up to the end of the line, are ignored.

As shown below the apache user has the following sudo entries available:

# sudo -lU apache
Matching Defaults entries for apache on dcom-nagiosxi-p1:
!visiblepw, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR
USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME
LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY",
secure_path=/usr/local/bin\:/sbin\:/bin\:/usr/sbin\:/usr/bin, !requiretty

User apache may run the following commands on dcom-nagiosxi-p1:
(root) NOPASSWD: /usr/bin/tail * /var/log/messages
(root) NOPASSWD: /usr/bin/tail * /var/log/httpd/error_log
(root) NOPASSWD: /usr/bin/tail * /var/log/mariadb/mariadb.log
(root) NOPASSWD: /usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
(root) NOPASSWD: /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
(root) NOPASSWD: /etc/init.d/snmptt restart
(root) NOPASSWD: /usr/local/nagiosxi/scripts/repair_databases.sh
(root) NOPASSWD: /usr/local/nagiosxi/scripts/manage_services.sh *
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: recurring_downtime

Post by npolovenko »

@onegative, I see. Can you include this line to your /etc/sudoers.d/10_NagiosXI file?
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/components/getprofile.sh
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
onegative
Posts: 173
Joined: Tue Feb 17, 2015 12:06 pm

Re: recurring_downtime

Post by onegative »

@npolovenko

So that fixed the issue....is this a missing entry in the nagios.sudoers file provided by upgrade????

Danny
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: recurring_downtime

Post by npolovenko »

@onegative, I haven't seen this issue happening during the upgrades to XI 5.6.2. It could be that Nagios tried to insert this entry to the /etc/sudoers file and then the entry got deleted. Or maybe you didn't click yes when the upgrade script asked about updating the sudoers entries. It's hard to tell at this point.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
onegative
Posts: 173
Joined: Tue Feb 17, 2015 12:06 pm

Re: recurring_downtime

Post by onegative »

You can lock this topic and thanks for your help,
Danny
Locked