status.php Status Information long output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Re: status.php Status Information long output

Post by ahoward12 »

This is what you're trying to achieve, correct? (Picture)

I actually even found the article I used here https://support.nagios.com/kb/article.php?id=478

I am no expert, just trying to help out. I'll answer any questions I can! Similar to your hostchecks, what does your servicechecks look like?
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: status.php Status Information long output

Post by cdienger »

Thanks for pointing the KB out. rexconsulting, can you confirm with a screenshot of the gui what you're seeing and what you'd liked changed?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ahoward12
Posts: 137
Joined: Thu Jan 05, 2017 10:24 am

Re: status.php Status Information long output

Post by ahoward12 »

If that picture is your end goal, it should do it. Here are copies of my checks just as a cross reference. Our hostchecks are identical..

Code: Select all

mysql> describe nagios_hostchecks;
+-----------------------+--------------+------+-----+---------------------+----------------+
| Field                 | Type         | Null | Key | Default             | Extra          |
+-----------------------+--------------+------+-----+---------------------+----------------+
| hostcheck_id          | int(11)      | NO   | PRI | NULL                | auto_increment |
| instance_id           | smallint(6)  | NO   | MUL | 0                   |                |
| host_object_id        | int(11)      | NO   |     | 0                   |                |
| check_type            | smallint(6)  | NO   |     | 0                   |                |
| is_raw_check          | smallint(6)  | NO   |     | 0                   |                |
| current_check_attempt | smallint(6)  | NO   |     | 0                   |                |
| max_check_attempts    | smallint(6)  | NO   |     | 0                   |                |
| state                 | smallint(6)  | NO   |     | 0                   |                |
| state_type            | smallint(6)  | NO   |     | 0                   |                |
| start_time            | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| start_time_usec       | int(11)      | NO   |     | 0                   |                |
| end_time              | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| end_time_usec         | int(11)      | NO   |     | 0                   |                |
| command_object_id     | int(11)      | NO   |     | 0                   |                |
| command_args          | varchar(255) | NO   |     |                     |                |
| command_line          | varchar(255) | NO   |     |                     |                |
| timeout               | smallint(6)  | NO   |     | 0                   |                |
| early_timeout         | smallint(6)  | NO   |     | 0                   |                |
| execution_time        | double       | NO   |     | 0                   |                |
| latency               | double       | NO   |     | 0                   |                |
| return_code           | smallint(6)  | NO   |     | 0                   |                |
| output                | mediumtext   | NO   |     | NULL                |                |
| long_output           | mediumtext   | NO   |     | NULL                |                |
| perfdata              | mediumtext   | NO   |     | NULL                |                |
+-----------------------+--------------+------+-----+---------------------+----------------+
24 rows in set (0.00 sec)

mysql> describe nagios_servicechecks;
+-----------------------+--------------+------+-----+---------------------+----------------+
| Field                 | Type         | Null | Key | Default             | Extra          |
+-----------------------+--------------+------+-----+---------------------+----------------+
| servicecheck_id       | int(11)      | NO   | PRI | NULL                | auto_increment |
| instance_id           | smallint(6)  | NO   | MUL | 0                   |                |
| service_object_id     | int(11)      | NO   | MUL | 0                   |                |
| check_type            | smallint(6)  | NO   |     | 0                   |                |
| current_check_attempt | smallint(6)  | NO   |     | 0                   |                |
| max_check_attempts    | smallint(6)  | NO   |     | 0                   |                |
| state                 | smallint(6)  | NO   |     | 0                   |                |
| state_type            | smallint(6)  | NO   |     | 0                   |                |
| start_time            | datetime     | NO   | MUL | 0000-00-00 00:00:00 |                |
| start_time_usec       | int(11)      | NO   |     | 0                   |                |
| end_time              | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| end_time_usec         | int(11)      | NO   |     | 0                   |                |
| command_object_id     | int(11)      | NO   |     | 0                   |                |
| command_args          | varchar(255) | NO   |     |                     |                |
| command_line          | varchar(255) | NO   |     |                     |                |
| timeout               | smallint(6)  | NO   |     | 0                   |                |
| early_timeout         | smallint(6)  | NO   |     | 0                   |                |
| execution_time        | double       | NO   |     | 0                   |                |
| latency               | double       | NO   |     | 0                   |                |
| return_code           | smallint(6)  | NO   |     | 0                   |                |
| output                | mediumtext   | NO   |     | NULL                |                |
| long_output           | mediumtext   | NO   |     | NULL                |                |
| perfdata              | mediumtext   | NO   |     | NULL                |                |
+-----------------------+--------------+------+-----+---------------------+----------------+
23 rows in set (0.00 sec)

mysql> describe nagios_hoststatus;
+-------------------------------+--------------+------+-----+---------------------+----------------+
| Field                         | Type         | Null | Key | Default             | Extra          |
+-------------------------------+--------------+------+-----+---------------------+----------------+
| hoststatus_id                 | int(11)      | NO   | PRI | NULL                | auto_increment |
| instance_id                   | smallint(6)  | NO   | MUL | 0                   |                |
| host_object_id                | int(11)      | NO   | UNI | 0                   |                |
| status_update_time            | datetime     | NO   | MUL | 0000-00-00 00:00:00 |                |
| output                        | mediumtext   | NO   |     | NULL                |                |
| long_output                   | mediumtext   | NO   |     | NULL                |                |
| perfdata                      | mediumtext   | NO   |     | NULL                |                |
| current_state                 | smallint(6)  | NO   | MUL | 0                   |                |
| has_been_checked              | smallint(6)  | NO   |     | 0                   |                |
| should_be_scheduled           | smallint(6)  | NO   |     | 0                   |                |
| current_check_attempt         | smallint(6)  | NO   |     | 0                   |                |
| max_check_attempts            | smallint(6)  | NO   |     | 0                   |                |
| last_check                    | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| next_check                    | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| check_type                    | smallint(6)  | NO   | MUL | 0                   |                |
| last_state_change             | datetime     | NO   | MUL | 0000-00-00 00:00:00 |                |
| last_hard_state_change        | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| last_hard_state               | smallint(6)  | NO   |     | 0                   |                |
| last_time_up                  | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| last_time_down                | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| last_time_unreachable         | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| state_type                    | smallint(6)  | NO   | MUL | 0                   |                |
| last_notification             | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| next_notification             | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| no_more_notifications         | smallint(6)  | NO   |     | 0                   |                |
| notifications_enabled         | smallint(6)  | NO   | MUL | 0                   |                |
| problem_has_been_acknowledged | smallint(6)  | NO   | MUL | 0                   |                |
| acknowledgement_type          | smallint(6)  | NO   |     | 0                   |                |
| current_notification_number   | smallint(6)  | NO   |     | 0                   |                |
| passive_checks_enabled        | smallint(6)  | NO   | MUL | 0                   |                |
| active_checks_enabled         | smallint(6)  | NO   | MUL | 0                   |                |
| event_handler_enabled         | smallint(6)  | NO   | MUL | 0                   |                |
| flap_detection_enabled        | smallint(6)  | NO   | MUL | 0                   |                |
| is_flapping                   | smallint(6)  | NO   | MUL | 0                   |                |
| percent_state_change          | double       | NO   | MUL | 0                   |                |
| latency                       | double       | NO   | MUL | 0                   |                |
| execution_time                | double       | NO   | MUL | 0                   |                |
| scheduled_downtime_depth      | smallint(6)  | NO   | MUL | 0                   |                |
| failure_prediction_enabled    | smallint(6)  | NO   |     | 0                   |                |
| process_performance_data      | smallint(6)  | NO   |     | 0                   |                |
| obsess_over_host              | smallint(6)  | NO   |     | 0                   |                |
| modified_host_attributes      | int(11)      | NO   |     | 0                   |                |
| event_handler                 | varchar(255) | NO   |     |                     |                |
| check_command                 | varchar(255) | NO   |     |                     |                |
| normal_check_interval         | double       | NO   |     | 0                   |                |
| retry_check_interval          | double       | NO   |     | 0                   |                |
| check_timeperiod_object_id    | int(11)      | NO   |     | 0                   |                |
+-------------------------------+--------------+------+-----+---------------------+----------------+
47 rows in set (0.00 sec)

mysql> describe nagios_servicestatus;
+-------------------------------+--------------+------+-----+---------------------+----------------+
| Field                         | Type         | Null | Key | Default             | Extra          |
+-------------------------------+--------------+------+-----+---------------------+----------------+
| servicestatus_id              | int(11)      | NO   | PRI | NULL                | auto_increment |
| instance_id                   | smallint(6)  | NO   | MUL | 0                   |                |
| service_object_id             | int(11)      | NO   | UNI | 0                   |                |
| status_update_time            | datetime     | NO   | MUL | 0000-00-00 00:00:00 |                |
| output                        | mediumtext   | NO   |     | NULL                |                |
| long_output                   | mediumtext   | NO   |     | NULL                |                |
| perfdata                      | mediumtext   | NO   |     | NULL                |                |
| current_state                 | smallint(6)  | NO   | MUL | 0                   |                |
| has_been_checked              | smallint(6)  | NO   |     | 0                   |                |
| should_be_scheduled           | smallint(6)  | NO   |     | 0                   |                |
| current_check_attempt         | smallint(6)  | NO   |     | 0                   |                |
| max_check_attempts            | smallint(6)  | NO   |     | 0                   |                |
| last_check                    | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| next_check                    | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| check_type                    | smallint(6)  | NO   | MUL | 0                   |                |
| last_state_change             | datetime     | NO   | MUL | 0000-00-00 00:00:00 |                |
| last_hard_state_change        | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| last_hard_state               | smallint(6)  | NO   |     | 0                   |                |
| last_time_ok                  | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| last_time_warning             | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| last_time_unknown             | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| last_time_critical            | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| state_type                    | smallint(6)  | NO   | MUL | 0                   |                |
| last_notification             | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| next_notification             | datetime     | NO   |     | 0000-00-00 00:00:00 |                |
| no_more_notifications         | smallint(6)  | NO   |     | 0                   |                |
| notifications_enabled         | smallint(6)  | NO   | MUL | 0                   |                |
| problem_has_been_acknowledged | smallint(6)  | NO   | MUL | 0                   |                |
| acknowledgement_type          | smallint(6)  | NO   |     | 0                   |                |
| current_notification_number   | smallint(6)  | NO   |     | 0                   |                |
| passive_checks_enabled        | smallint(6)  | NO   | MUL | 0                   |                |
| active_checks_enabled         | smallint(6)  | NO   | MUL | 0                   |                |
| event_handler_enabled         | smallint(6)  | NO   | MUL | 0                   |                |
| flap_detection_enabled        | smallint(6)  | NO   | MUL | 0                   |                |
| is_flapping                   | smallint(6)  | NO   | MUL | 0                   |                |
| percent_state_change          | double       | NO   | MUL | 0                   |                |
| latency                       | double       | NO   | MUL | 0                   |                |
| execution_time                | double       | NO   | MUL | 0                   |                |
| scheduled_downtime_depth      | smallint(6)  | NO   | MUL | 0                   |                |
| failure_prediction_enabled    | smallint(6)  | NO   |     | 0                   |                |
| process_performance_data      | smallint(6)  | NO   |     | 0                   |                |
| obsess_over_service           | smallint(6)  | NO   |     | 0                   |                |
| modified_service_attributes   | int(11)      | NO   |     | 0                   |                |
| event_handler                 | varchar(255) | NO   |     |                     |                |
| check_command                 | varchar(255) | NO   |     |                     |                |
| normal_check_interval         | double       | NO   |     | 0                   |                |
| retry_check_interval          | double       | NO   |     | 0                   |                |
| check_timeperiod_object_id    | int(11)      | NO   |     | 0                   |                |
+-------------------------------+--------------+------+-----+---------------------+----------------+
48 rows in set (0.00 sec)
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: status.php Status Information long output

Post by cdienger »

Thanks for for the screenshot and database details, Ahward12. Hopefully that helps get us in the right direction.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
rexconsulting
Posts: 60
Joined: Fri May 04, 2012 4:27 pm
Location: Oakland, CA
Contact:

Re: status.php Status Information long output

Post by rexconsulting »

OK so it's not the database schema; it's the code in status.php. I will take a look at what I can do to provide this screen with the API, as suggested. Many thanks for all the inputs.

CP
CP
--
Chris Paul
Rex Consulting, Inc
5652 Florence Terrace, Oakland, CA 94611
email: [email protected]
web: http://www.rexconsulting.net
phone, toll-free: +1 (888) 403-8996 ext 1
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: status.php Status Information long output

Post by cdienger »

Unless you can recall making some change to the status.php file, I don't think it would be anything in there. Are you sure you're looking at the correct database? Did you offload the database to a separate server at some point? https://assets.nagios.com/downloads/nag ... Server.pdf covers offloading the server. If you want to PM a profile to us we can take a closer look at some of these things. Generate a profile under Admin > System Config > System Profile.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked