Could not parse JSON alarm

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vijilants
Posts: 215
Joined: Wed Jun 12, 2013 2:50 pm

Re: Could not parse JSON alarm

Post by vijilants »

Sorry about the delay in replying
1. Did increasing the timeout on the check command make any improvements?
- No Change
2. This issue is happening every morning. Is anything else happening on the server on a scheduled basis (e.g backup) that maybe causing the load to increase?
Every morning - nothing else going on from what I am aware
3. Let's check the table sizes of your database. Please post the output for the following queries.

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');" | mysql -h 127.0.0.1 -uroot -pnagiosxi --table
+--------------------------------------------+------------+
| Table                                      | Size in MB |
+--------------------------------------------+------------+
| nagios_acknowledgements                    |       0.01 |
| nagios_commands                            |       0.02 |
| nagios_commenthistory                      |       1.43 |
| nagios_comments                            |       0.00 |
| nagios_configfiles                         |       0.00 |
| nagios_configfilevariables                 |       0.01 |
| nagios_conninfo                            |       0.22 |
| nagios_contact_addresses                   |       0.00 |
| nagios_contact_notificationcommands        |       0.01 |
| nagios_contactgroup_members                |       0.00 |
| nagios_contactgroups                       |       0.00 |
| nagios_contactnotificationmethods          |       5.89 |
| nagios_contactnotifications                |       6.19 |
| nagios_contacts                            |       0.00 |
| nagios_contactstatus                       |       0.00 |
| nagios_customvariables                     |       0.27 |
| nagios_customvariablestatus                |       0.29 |
| nagios_dbversion                           |       0.00 |
| nagios_downtimehistory                     |       0.02 |
| nagios_eventhandlers                       |       0.00 |
| nagios_externalcommands                    |       2.25 |
| nagios_flappinghistory                     |       1.04 |
| nagios_host_contactgroups                  |       0.00 |
| nagios_host_contacts                       |       0.01 |
| nagios_host_parenthosts                    |       0.01 |
| nagios_hostchecks                          |       0.00 |
| nagios_hostdependencies                    |       0.00 |
| nagios_hostescalation_contactgroups        |       0.00 |
| nagios_hostescalation_contacts             |       0.00 |
| nagios_hostescalations                     |       0.00 |
| nagios_hostgroup_members                   |       0.01 |
| nagios_hostgroups                          |       0.00 |
| nagios_hosts                               |       0.07 |
| nagios_hoststatus                          |       0.18 |
| nagios_instances                           |       0.00 |
| nagios_logentries                          |     311.63 |
| nagios_notifications                       |      34.51 |
| nagios_objects                             |       1.25 |
| nagios_processevents                       |       0.15 |
| nagios_programstatus                       |       0.00 |
| nagios_runtimevariables                    |       0.00 |
| nagios_scheduleddowntime                   |       0.00 |
| nagios_service_contactgroups               |       0.00 |
| nagios_service_contacts                    |       0.19 |
| nagios_service_parentservices              |       0.00 |
| nagios_servicechecks                       |       0.00 |
| nagios_servicedependencies                 |       0.00 |
| nagios_serviceescalation_contactgroups     |       0.00 |
| nagios_serviceescalation_contacts          |       0.00 |
| nagios_serviceescalations                  |       0.00 |
| nagios_servicegroup_members                |       0.03 |
| nagios_servicegroups                       |       0.00 |
| nagios_services                            |       0.95 |
| nagios_servicestatus                       |       2.18 |
| nagios_statehistory                        |     101.02 |
| nagios_systemcommands                      |       0.04 |
| nagios_timedeventqueue                     |       0.00 |
| nagios_timedevents                         |       0.00 |
| nagios_timeperiod_timeranges               |       0.00 |
| nagios_timeperiods                         |       0.00 |
| tbl_command                                |       0.03 |
| tbl_contact                                |       0.01 |
| tbl_contactgroup                           |       0.01 |
| tbl_contacttemplate                        |       0.01 |
| tbl_domain                                 |       0.01 |
| tbl_host                                   |       0.06 |
| tbl_hostdependency                         |       0.00 |
| 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.01 |
| tbl_lnkHostToContactgroup                  |       0.00 |
| tbl_lnkHostToHost                          |       0.01 |
| tbl_lnkHostToHostgroup                     |       0.01 |
| tbl_lnkHostToHosttemplate                  |       0.01 |
| tbl_lnkHostToVariabledefinition            |       0.01 |
| 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.00 |
| 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.10 |
| tbl_lnkServiceToContactgroup               |       0.00 |
| tbl_lnkServiceToHost                       |       0.11 |
| tbl_lnkServiceToHostgroup                  |       0.00 |
| tbl_lnkServiceToServicegroup               |       0.02 |
| tbl_lnkServiceToServicetemplate            |       0.14 |
| tbl_lnkServiceToVariabledefinition         |       0.11 |
| 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                                |       0.69 |
| 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.00 |
| tbl_timeperiod                             |       0.01 |
| tbl_user                                   |       0.01 |
| tbl_variabledefinition                     |       0.24 |
+--------------------------------------------+------------+

Code: Select all

echo "SELECT relname as Table, pg_size_pretty(pg_total_relation_size(relid)) As Size, pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as ExternalSize FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;" | psql nagiosxi nagiosxi
        table        |  size   | externalsize 
---------------------+---------+--------------
 xi_meta             | 22 MB   | 6328 kB
 xi_events           | 2744 kB | 2728 kB
 xi_auth_tokens      | 1368 kB | 1312 kB
 xi_auditlog         | 736 kB  | 592 kB
 xi_usermeta         | 120 kB  | 88 kB
 xi_sysstat          | 96 kB   | 72 kB
 xi_options          | 96 kB   | 72 kB
 xi_commands         | 80 kB   | 72 kB
 xi_mibs             | 72 kB   | 64 kB
 xi_users            | 72 kB   | 64 kB
 xi_eventqueue       | 72 kB   | 72 kB
 xi_sessions         | 48 kB   | 40 kB
 xi_cmp_trapdata     | 24 kB   | 24 kB
 xi_cmp_trapdata_log | 16 kB   | 16 kB
 xi_incidents        | 0 bytes | 0 bytes
(15 rows)
4. Since this is intermittent, please download a new system profile at the time of the error, so we can take a log which processes are running and any errors in the logs. Thanks.
This could be a problem to obtain as it occurs at various times in the morning and catching the time it happens and running the request for the profile may not happen due to co-ordinating staff and the event.

See below for occurrences this month:

Date / Time Host Service State State Type Attempt Information
2019-10-02 08:16:34 cedarnms1 Nagios XI Daemons OK SOFT 2 of 5 All daemons are running okay.
2019-10-02 08:15:35 cedarnms1 Nagios XI Daemons CRITICAL SOFT 1 of 5 Error: Could not parse JSON from http://XX.XX.XX.XX/nagiosxi/ (false
2019-10-02 06:19:51 cedarnms1 Nagios XI Daemons OK SOFT 2 of 5 All daemons are running okay.
2019-10-02 06:18:52 cedarnms1 Nagios XI Daemons CRITICAL SOFT 1 of 5 Error: Could not parse JSON from http://XX.XX.XX.XX/nagiosxi/ (false
2019-10-01 09:13:05 cedarnms1 Nagios XI Daemons OK SOFT 2 of 5 All daemons are running okay.
2019-10-01 09:12:07 cedarnms1 Nagios XI Daemons CRITICAL SOFT 1 of 5 Error: Could not parse JSON from http://XX.XX.XX.XX/nagiosxi/ (false
2019-10-01 07:48:02 cedarnms1 Nagios XI Daemons OK SOFT 3 of 5 All daemons are running okay.
2019-10-01 07:47:02 cedarnms1 Nagios XI Daemons CRITICAL SOFT 2 of 5 Error: Could not parse JSON from http://XX.XX.XX.XX/nagiosxi/ (false
2019-10-01 07:46:03 cedarnms1 Nagios XI Daemons CRITICAL SOFT 1 of 5 Error: Could not parse JSON from http://XX.XX.XX.XX/nagiosxi/ (false
2019-10-01 06:55:35 cedarnms1 Nagios XI Daemons OK SOFT 2 of 5 All daemons are running okay.
2019-10-01 06:54:36 cedarnms1 Nagios XI Daemons CRITICAL SOFT 1 of 5 Error: Could not parse JSON from http://XX.XX.XX.XX/nagiosxi/ (false
2019-10-01 06:47:40 cedarnms1 Nagios XI Daemons OK SOFT 2 of 5 All daemons are running okay.
2019-10-01 06:46:41 cedarnms1 Nagios XI Daemons CRITICAL SOFT 1 of 5 Error: Could not parse JSON from http://XX.XX.XX.XX/nagiosxi/ (false
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Could not parse JSON alarm

Post by benjaminsmith »

Hello @vijilants,
This could be a problem to obtain as it occurs at various times in the morning and catching the time it happens and running the request for the profile may not happen due to co-ordinating staff and the event.
As this happening only at that time, if you're able to capture a logs or a system profile at the time of the issue, it would help us troubleshoot this error.

You have a couple IP address in the Apache log that are of interest. The XI server is ending in .42.3, what is the host at the IP address in .44.86? Please double check the Program URL settings to make sure they are set correctly.
program-settings.png
Next, there are some entries for too many connections to the apache log. While the tables sizes are ok, please follow the knowledgebase article below to increase the max connections in the db configuration settings, and let me know this helps. Also, this article will explain how to monitor this metric as well.

Nagios XI - MySQL/MariaDB - Max Connections
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked