Password: su: Authentication failure
ERROR: Could not create or update '/usr/local/nagios/var/nagios.configtest'
Config test failed. Checkpoint aborted.
occurring every minute or so.
1. Why are these errors?
2. How to correct them?
3. How to tame these logs ?
It looks like permission or write problems. First, feel free to remove the logs with "rm /usr/local/nagiosxi/var/sysstat.log" and "rm /usr/local/nagiosxi/var/nom.log".
Then check that /var/nagiosramdisk has rw permissions with "mount". It should look something like:
tmpfs on /var/nagiosramdisk type tmpfs (rw,size=100m)
/etc/sudoers should also contain entries like the following:
User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_ssl_config.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
Finally, check if the naigos account has expired with "chage -l nagios" and update it with "chage -I -1 -m 0 -M 99999 -E -1 nagios" if needed.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Thank you for the details, Checked on these and verified the permissions. Sudoers entry are exactly the same. They all appear to be fine. With the Ramdisk we had the nom and sys stat logs getting in GBs very quickly.
Reverted back from Ramdisk to local disks and things seems to have settled down now. Those errors are not to be seen in nom.log anymore. There is only one error that is repeating on every cycle of nom cron.
Password: su: Authentication failure
ERROR: Could not create or update '/usr/local/nagios/var/nagios.configtest'
Config test failed. Checkpoint aborted.
Sorry - typo on my end. The command should have been:
su nagios -c "touch /usr/local/nagios/var/nagios.configtest"
This is the command that is automatically running and producing the error. By running it manually at the command line I'm not expecting it to "do" anything really besides hopefully giving us a clue as to why it isn't working.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
/usr/local/nagiosxi/scripts/nom_create_nagioscore_checkpoint_cond.sh
OK.
RESETTING PERMS
/usr/local/nagiosxi/nom/checkpoints/nagioscore ~
tar: Removing leading `/' from member names
~
Config test passed. Checkpoint created.
[root@phlprcnagnxi001 etc]# ls -l /usr/local/nagios | grep var
drwxr-xr-x 6 nagios nagios 4096 Aug 24 15:04 var
[root@phlprcnagnxi001 etc]# ls -al /usr/local/nagios/var/nagios.configtest
ls: cannot access /usr/local/nagios/var/nagios.configtest: No such file or directory
[root@phlprcnagnxi001 etc]#