Notification report not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Notification report not working

Post by tpwebb »

Hello,
I recently had a problem with my virtual machine that Nagios sits on and restored it,

It appears to be working, however I am having trouble with some reports for example Notification reports is not showing any data but tells me there a a number of pages to be reviewed.

We have some other reports not working like availability report doesn't show the pie graphs and so on.

Your help would be appreciated.
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Notification report not working

Post by tpwebb »

Should include some information

Centos 7
Nagios Version 5.81

Profile is attached

Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Notification report not working

Post by ssax »

Are you receiving notifications? I'm seeing this over and over for each notification:

Code: Select all

[01-29-2021 09:00:04] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting (method=smtp;host=mail.XXXXXX.its1111;port=25;security=none), Referer: includes/components/scheduledreporting > Scheduled Report
Does the Send a Test Email button work in Admin > Email Settings?

If not, do this:

https://support.nagios.com/kb/article/p ... g-820.html

Then send us the debug output.

Additionally, please send the output of this command:
- NOTE: You may need to adjust the -h 127.0.0.1, the -uroot, and -pnagiosxi in the command if your DB is offloaded to another server and/or you've changed the root mysql password

Code: Select all

echo "SELECT table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES WHERE table_schema IN ('nagios', 'nagiosql', 'nagiosxi');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
Please send a screenshot of the ENTIRE page for what you see in the notifications report.
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Notification report not working

Post by tpwebb »

Hello,

Yes we are still receiving notifications. I have attached a notification received last night for information
Nagios Notifications.png
Query information

+--------------------------------------------+------------+
| Table | Size in MB |
+--------------------------------------------+------------+
| nagios_acknowledgements | 0.22 |
| nagios_commands | 0.02 |
| nagios_commenthistory | 8.77 |
| nagios_comments | 0.00 |
| nagios_configfiles | 0.00 |
| nagios_configfilevariables | 0.00 |
| nagios_conninfo | 0.56 |
| nagios_contact_addresses | 0.00 |
| nagios_contact_notificationcommands | 0.01 |
| nagios_contactgroup_members | 0.00 |
| nagios_contactgroups | 0.00 |
| nagios_contactnotificationmethods | 0.02 |
| nagios_contactnotifications | 0.02 |
| nagios_contacts | 0.00 |
| nagios_contactstatus | 0.00 |
| nagios_customvariables | 0.05 |
| nagios_customvariablestatus | 0.06 |
| nagios_dbversion | 0.00 |
| nagios_downtimehistory | 3.17 |
| nagios_eventhandlers | 0.02 |
| nagios_externalcommands | 0.20 |
| nagios_flappinghistory | 5.52 |
| nagios_host_contactgroups | 0.03 |
| nagios_host_contacts | 0.00 |
| nagios_host_parenthosts | 0.00 |
| nagios_hostchecks | 0.30 |
| nagios_hostdependencies | 0.00 |
| nagios_hostescalation_contactgroups | 0.00 |
| nagios_hostescalation_contacts | 0.00 |
| nagios_hostescalations | 0.00 |
| nagios_hostgroup_members | 0.03 |
| nagios_hostgroups | 0.00 |
| nagios_hosts | 0.14 |
| nagios_hoststatus | 0.36 |
| nagios_instances | 0.00 |
| nagios_logentries | 1420.93 |
| nagios_notifications | 0.01 |
| nagios_objects | 3.50 |
| nagios_processevents | 0.46 |
| nagios_programstatus | 0.00 |
| nagios_runtimevariables | 0.00 |
| nagios_scheduleddowntime | 0.00 |
| nagios_service_contactgroups | 0.00 |
| nagios_service_contacts | 0.00 |
| nagios_service_parentservices | 0.00 |
| nagios_servicechecks | 2.73 |
| nagios_servicedependencies | 0.00 |
| nagios_serviceescalation_contactgroups | 0.00 |
| nagios_serviceescalation_contacts | 0.00 |
| nagios_serviceescalations | 0.00 |
| nagios_servicegroup_members | 0.00 |
| nagios_servicegroups | 0.00 |
| nagios_services | 1.82 |
| nagios_servicestatus | 4.75 |
| nagios_statehistory | 7.83 |
| nagios_systemcommands | 0.03 |
| nagios_timedeventqueue | 0.00 |
| nagios_timedevents | 0.00 |
| nagios_timeperiod_timeranges | 0.01 |
| nagios_timeperiods | 0.00 |
| tbl_command | 0.04 |
| tbl_contact | 0.01 |
| tbl_contactgroup | 0.01 |
| tbl_contacttemplate | 0.01 |
| tbl_domain | 0.01 |
| tbl_host | 0.12 |
| tbl_hostdependency | 0.01 |
| tbl_hostescalation | 0.00 |
| tbl_hostextinfo | 0.00 |
| tbl_hostgroup | 0.01 |
| tbl_hosttemplate | 0.01 |
| tbl_info | 0.13 |
| tbl_lnkContactToCommandHost | 0.00 |
| tbl_lnkContactToCommandService | 0.00 |
| tbl_lnkContactToContactgroup | 0.00 |
| tbl_lnkContactToContacttemplate | 0.00 |
| tbl_lnkContactToVariabledefinition | 0.00 |
| tbl_lnkContactgroupToContact | 0.00 |
| tbl_lnkContactgroupToContactgroup | 0.00 |
| tbl_lnkContacttemplateToCommandHost | 0.00 |
| tbl_lnkContacttemplateToCommandService | 0.00 |
| tbl_lnkContacttemplateToContactgroup | 0.00 |
| tbl_lnkContacttemplateToContacttemplate | 0.00 |
| tbl_lnkContacttemplateToVariabledefinition | 0.00 |
| tbl_lnkHostToContact | 0.00 |
| tbl_lnkHostToContactgroup | 0.02 |
| tbl_lnkHostToHost | 0.00 |
| tbl_lnkHostToHostgroup | 0.01 |
| tbl_lnkHostToHosttemplate | 0.02 |
| tbl_lnkHostToVariabledefinition | 0.02 |
| tbl_lnkHostdependencyToHost_DH | 0.00 |
| tbl_lnkHostdependencyToHost_H | 0.00 |
| tbl_lnkHostdependencyToHostgroup_DH | 0.00 |
| tbl_lnkHostdependencyToHostgroup_H | 0.00 |
| tbl_lnkHostescalationToContact | 0.00 |
| tbl_lnkHostescalationToContactgroup | 0.00 |
| tbl_lnkHostescalationToHost | 0.00 |
| tbl_lnkHostescalationToHostgroup | 0.00 |
| tbl_lnkHostgroupToHost | 0.01 |
| tbl_lnkHostgroupToHostgroup | 0.00 |
| tbl_lnkHosttemplateToContact | 0.00 |
| tbl_lnkHosttemplateToContactgroup | 0.00 |
| tbl_lnkHosttemplateToHost | 0.00 |
| tbl_lnkHosttemplateToHostgroup | 0.00 |
| tbl_lnkHosttemplateToHosttemplate | 0.00 |
| tbl_lnkHosttemplateToVariabledefinition | 0.00 |
| tbl_lnkServiceToContact | 0.00 |
| tbl_lnkServiceToContactgroup | 0.11 |
| tbl_lnkServiceToHost | 0.20 |
| tbl_lnkServiceToHostgroup | 0.00 |
| tbl_lnkServiceToServicegroup | 0.00 |
| tbl_lnkServiceToServicetemplate | 0.24 |
| tbl_lnkServiceToVariabledefinition | 0.19 |
| tbl_lnkServicedependencyToHost_DH | 0.00 |
| tbl_lnkServicedependencyToHost_H | 0.00 |
| tbl_lnkServicedependencyToHostgroup_DH | 0.00 |
| tbl_lnkServicedependencyToHostgroup_H | 0.00 |
| tbl_lnkServicedependencyToService_DS | 0.00 |
| tbl_lnkServicedependencyToService_S | 0.00 |
| tbl_lnkServicedependencyToServicegroup_DS | 0.02 |
| tbl_lnkServicedependencyToServicegroup_S | 0.02 |
| tbl_lnkServiceescalationToContact | 0.00 |
| tbl_lnkServiceescalationToContactgroup | 0.00 |
| tbl_lnkServiceescalationToHost | 0.00 |
| tbl_lnkServiceescalationToHostgroup | 0.00 |
| tbl_lnkServiceescalationToService | 0.00 |
| tbl_lnkServiceescalationToServicegroup | 0.02 |
| tbl_lnkServicegroupToService | 0.00 |
| tbl_lnkServicegroupToServicegroup | 0.00 |
| tbl_lnkServicetemplateToContact | 0.00 |
| tbl_lnkServicetemplateToContactgroup | 0.00 |
| tbl_lnkServicetemplateToHost | 0.00 |
| tbl_lnkServicetemplateToHostgroup | 0.00 |
| tbl_lnkServicetemplateToServicegroup | 0.00 |
| tbl_lnkServicetemplateToServicetemplate | 0.01 |
| tbl_lnkServicetemplateToVariabledefinition | 0.00 |
| tbl_lnkTimeperiodToTimeperiod | 0.00 |
| tbl_logbook | 0.00 |
| tbl_mainmenu | 0.00 |
| tbl_permission | 0.02 |
| tbl_permission_inactive | 0.02 |
| tbl_service | 1.49 |
| tbl_servicedependency | 0.00 |
| tbl_serviceescalation | 0.00 |
| tbl_serviceextinfo | 0.00 |
| tbl_servicegroup | 0.01 |
| tbl_servicetemplate | 0.02 |
| tbl_session | 0.00 |
| tbl_session_locks | 0.00 |
| tbl_settings | 0.00 |
| tbl_submenu | 0.00 |
| tbl_timedefinition | 0.01 |
| tbl_timeperiod | 0.01 |
| tbl_user | 0.01 |
| tbl_variabledefinition | 0.40 |
| xi_auditlog | 0.91 |
| xi_auth_tokens | 0.03 |
| xi_cmp_ccm_backups | 0.02 |
| xi_cmp_favorites | 0.03 |
| xi_cmp_nagiosbpi_backups | 0.48 |
| xi_cmp_scheduledreports_log | 0.02 |
| xi_cmp_trapdata | 0.03 |
| xi_cmp_trapdata_log | 0.03 |
| xi_commands | 0.09 |
| xi_deploy_agents | 0.02 |
| xi_deploy_jobs | 0.02 |
| xi_eventqueue | 0.03 |
| xi_events | 0.02 |
| xi_incidents | 0.00 |
| xi_meta | 3.97 |
| xi_mibs | 0.05 |
| xi_options | 0.04 |
| xi_sessions | 0.03 |
| xi_sysstat | 0.01 |
| xi_usermeta | 0.15 |
| xi_users | 0.01 |
+--------------------------------------------+------------+

Screen Shot
Nagios Notifications report.png

Regards
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Notification report not working

Post by ssax »

What is the output of this command?

Code: Select all

sestatus
If you have selinux enabled that's likely why. Please disable or set to permissive:

https://linuxize.com/post/how-to-disabl ... -centos-8/

I'm seeing this:

Code: Select all

[Mon Jul 20 17:33:17.168487 2020] [core:error] [pid 125659:tid 140333783770880] (13)Permission denied: [client X.X.3.13:53546] AH00035: access to /nagiosxi/ajaxhelper.php denied (filesystem path '/usr/local/nagiosxi/html') because search permissions are missing on a component of the path, referer: http://XXXXXXXXXXXXXX/nagiosxi/index.php
What is the output of these commands?

Code: Select all

ls -ld /usr/local/nagiosxi
ls -ld /usr/local/nagiosxi/html
ls -l /usr/local/nagiosxi/html
Run this command as root and send me the resulting /tmp/HTTPDFILES.zip file:

Code: Select all

zip -r /tmp/HTTPDFILES.zip /etc/httpd/conf/httpd.conf /etc/httpd/conf.d /etc/php.ini /etc/php-fpm.conf /etc/php-fpm.d
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Notification report not working

Post by tpwebb »

Hello,

Hopefully this answers your questions

sestatus

[root@nagios /]# sestatus
SELinux status: disabled
[root@nagios /]#

[root@nagios share]# ls -ld /usr/local/nagiosxi
drwxr-xr-x 10 root nagios 4096 Dec 3 2019 /usr/local/nagiosxi

[root@nagios share]# ls -ld /usr/local/nagiosxi/html
drwxr-xr-x 21 root nagios 4096 Jun 10 2020 /usr/local/nagiosxi/html

[root@nagios share]# ls -l /usr/local/nagiosxi/html
total 1200
drwxr-xr-x 2 nagios nagios 4096 Jun 15 2016 about
drwxr-xr-x 2 nagios nagios 4096 Sep 19 2019 account
drwxr-xr-x 2 nagios nagios 4096 Jun 15 2016 addons
drwxr-xr-x 2 nagios nagios 4096 Jan 19 10:43 admin
-rwxr-xr-- 1 nagios nagios 28137 Jan 19 10:43 ajaxhelper.php
-rwxr-xr-- 1 nagios nagios 1902 Jan 19 10:43 ajaxproxy.php
drwxr-xr-x 4 nagios nagios 4096 Jun 15 2016 api
drwxr-xr-x 3 nagios nagios 4096 Jun 15 2016 backend
drwxr-xr-x 4 nagios nagios 4096 Jun 10 2020 config
-rwxr-xr-- 1 nagios nagios 8843 Jan 19 10:43 config.inc.dist
-rw-r--r-- 1 root nagios 8843 Jan 19 10:43 config.inc.php
-rwxr-xr-- 1 nagios nagios 8843 Jan 19 10:43 config.inc.saved
drwxr-xr-x 2 nagios nagios 4096 Jun 15 2016 dashboards
drwxr-xr-x 4 nagios nagios 4096 Jun 15 2016 db
drwxr-xr-x 3 nagios nagios 4096 Jun 15 2016 downloads
drwxr-xr-x 2 nagios nagios 4096 Sep 19 2019 help
drwxr-xr-x 6 nagios nagios 12288 Jan 20 15:32 images
drwxr-xr-x 11 nagios nagios 4096 Jun 10 2020 includes
-rwxr-xr-- 1 nagios nagios 878 Jan 19 10:43 index.php
-rwxr-xr-- 1 nagios nagios 435249 Jan 19 10:43 install.php
-rwxr-xr-- 1 nagios nagios 486789 Jan 19 10:43 login.php
-rw-r--r-- 1 nagios nagios 5372 Jan 19 10:43 loginsplash.inc.dist
-rw-r--r-- 1 nagios nagios 2381 Jan 19 10:43 loginsplash.inc.php
-rw-r--r-- 1 nagios nagios 2381 Jan 19 10:43 loginsplash.inc.saved
drwxr-xr-x 5 nagios nagios 4096 Jun 10 2020 mobile
drwxr-xr-x 2 nagios nagios 4096 Jun 15 2016 perfgraphs
drwxr-xr-x 2 nagios nagios 4096 Sep 7 2018 reports
-rw-r--r-- 1 nagios nagios 30332 Jan 19 10:43 rr.php
drwxrwxr-x 3 apache nagios 4096 Oct 17 11:41 sounds
-rwxr-xr-- 1 nagios nagios 11868 Jan 19 10:43 suggest.php
drwxr-xr-x 2 nagios nagios 4096 Jun 15 2016 tools
-rwxr-xr-- 1 nagios nagios 81521 Jan 19 10:43 upgrade.php
drwxr-xr-x 2 nagios nagios 4096 Jun 15 2016 views

Httpd files
httpdfiles.zip
I will send another copy of the profile to you personal message
You do not have the required permissions to view the files attached to this post.
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Notification report not working

Post by tpwebb »

Hello,

I should also mention this is an internal system with very limited access to the internet, only used for upgrade.

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

Re: Notification report not working

Post by ssax »

Hmm, it's working properly on my system with your configs.

I'm seeing this in the logs which is why I was asking about selinux:

Code: Select all

[Mon Jul 20 17:03:09.217612 2020] [core:notice] [pid 87628:tid 139701710256448] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
What do these show as root?

Code: Select all

getenforce
grep nag /etc/group
ls -ld /usr/local
ls -ld /usr
chage -l nagios
umask
su - nagios
umask
tpwebb
Posts: 70
Joined: Thu Sep 01, 2016 2:21 am

Re: Notification report not working

Post by tpwebb »

Hello

[root@nagios /]# getenforce
Disabled
[root@nagios /]#

[root@nagios /]# grep naq /etc/group
[root@nagios /]#

[root@nagios /]# ls -ld /usr/local
drwxr-xr-x. 24 root root 4096 Nov 26 2019 /usr/local
[root@nagios /]#

[root@nagios /]# ls -ld /usr
drwxr-xr-x. 13 root root 4096 Aug 21 2019 /usr
[root@nagios /]#

[root@nagios /]# chage -l nagios
Last password change : Aug 20, 2019
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
You have new mail in /var/spool/mail/root
[root@nagios /]#

[root@nagios /]# umask
0022
[root@nagios /]#

[root@nagios /]# su - nagios
Last login: Tue Feb 2 10:42:47 AEST 2021
[nagios@nagios ~]$

[nagios@nagios ~]$ umask
0002
[nagios@nagios ~]$
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Notification report not working

Post by ssax »

Send this one again: (you spelled nag with a q, it should be a g)

Code: Select all

grep nag /etc/group