ndoutils missing output column from nagios_hostchecks table after updating to 1.48
shadih rahman
shadhin71 at gmail.com
Mon Oct 5 05:11:27 CEST 2009
I used alter table for all table mentioned in the patch.
cat mysql-upgrade-1.4b8.sql
ALTER TABLE `nagios_hostchecks` ADD COLUMN `long_output` varchar(8192) NOT
NULL default '' AFTER `output`;
ALTER TABLE `nagios_hoststatus` ADD COLUMN `long_output` varchar(8192) NOT
NULL default '' AFTER `output`;
ALTER TABLE `nagios_servicechecks` ADD COLUMN `long_output` varchar(8192)
NOT NULL default '' AFTER `output`;
ALTER TABLE `nagios_servicestatus` ADD COLUMN `long_output` varchar(8192)
NOT NULL default '' AFTER `output`;
ALTER TABLE `nagios_statehistory` ADD COLUMN `long_output` varchar(8192) NOT
NULL default '' AFTER `output`;
ALTER TABLE `nagios_eventhandlers` ADD COLUMN `long_output` varchar(8192)
NOT NULL default '' AFTER `output`;
ALTER TABLE `nagios_systemcommands` ADD COLUMN `long_output` varchar(8192)
NOT NULL default '' AFTER `output`;
ALTER TABLE `nagios_notifications` ADD COLUMN `long_output` varchar(8192)
NOT NULL default '' AFTER `output`;
mysql> desc 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 | 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 | varchar(255) | NO | |
| |
| long_output | varchar(8192) | NO | |
| |
| perfdata | varchar(255) | NO | |
| |
+-----------------------+---------------+------+-----+---------------------+----------------+
mysql> desc nagios_hoststatus;
+-------------------------------+---------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key |
Default | Extra |
+-------------------------------+---------------+------+-----+---------------------+----------------+
| hoststatus_id | int(11) | NO | PRI |
NULL | auto_increment |
| instance_id | smallint(6) | NO | |
0 | |
| host_object_id | int(11) | NO | UNI |
0 | |
| status_update_time | datetime | NO | | 0000-00-00
00:00:00 | |
| output | varchar(255) | NO |
| | |
| long_output | varchar(8192) | NO |
| | |
| perfdata | varchar(255) | NO |
| | |
| current_state | smallint(6) | NO | |
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 | |
0 | |
| last_state_change | datetime | NO | | 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 | |
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 | |
0 | |
| problem_has_been_acknowledged | smallint(6) | NO | |
0 | |
| acknowledgement_type | smallint(6) | NO | |
0 | |
| current_notification_number | smallint(6) | NO | |
0 | |
| passive_checks_enabled | smallint(6) | NO | |
0 | |
| active_checks_enabled | smallint(6) | NO | |
0 | |
| event_handler_enabled | smallint(6) | NO | |
0 | |
| flap_detection_enabled | smallint(6) | NO | |
0 | |
| is_flapping | smallint(6) | NO | |
0 | |
| percent_state_change | double | NO | |
0 | |
| latency | double | NO | |
0 | |
| execution_time | double | NO | |
0 | |
| scheduled_downtime_depth | smallint(6) | NO | |
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> desc 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 | | 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 | | 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 | varchar(255) | NO | |
| |
| long_output | varchar(8192) | NO | |
| |
| perfdata | varchar(255) | NO | |
| |
+-----------------------+---------------+------+-----+---------------------+----------------+
23 rows in set (0.00 sec)
mysql> desc nagios_servicestatus;
+-------------------------------+---------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key |
Default | Extra |
+-------------------------------+---------------+------+-----+---------------------+----------------+
| servicestatus_id | int(11) | NO | PRI |
NULL | auto_increment |
| instance_id | smallint(6) | NO | |
0 | |
| service_object_id | int(11) | NO | UNI |
0 | |
| status_update_time | datetime | NO | | 0000-00-00
00:00:00 | |
| output | varchar(255) | NO |
| | |
| long_output | varchar(8192) | NO |
| | |
| perfdata | varchar(255) | NO |
| | |
| current_state | smallint(6) | NO | |
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 | |
0 | |
| last_state_change | datetime | NO | | 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 | |
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 | |
0 | |
| problem_has_been_acknowledged | smallint(6) | NO | |
0 | |
| acknowledgement_type | smallint(6) | NO | |
0 | |
| current_notification_number | smallint(6) | NO | |
0 | |
| passive_checks_enabled | smallint(6) | NO | |
0 | |
| active_checks_enabled | smallint(6) | NO | |
0 | |
| event_handler_enabled | smallint(6) | NO | |
0 | |
| flap_detection_enabled | smallint(6) | NO | |
0 | |
| is_flapping | smallint(6) | NO | |
0 | |
| percent_state_change | double | NO | |
0 | |
| latency | double | NO | |
0 | |
| execution_time | double | NO | |
0 | |
| scheduled_downtime_depth | smallint(6) | NO | |
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)
On Mon, Oct 5, 2009 at 12:32 AM, Michael Friedrich <
michael.friedrich at univie.ac.at> wrote:
> Did you apply the mysql patch for 1.4b8 since there was an introduction
> in long_output ?
>
> shadih rahman wrote:
>
> All,
> I have updated to ndoutils 1.48 and followed the instruction to do so.
> Now I am seeing that I am missing output column data from both
> nagios_hostchecks and nagios_servicechecks tables.
>
> Below I am attaching a query and output to show you the behavior. Please
> advise on this. thanks
>
>
>
>
> select start_time, output from nagios_hostchecks where host_object_id
> =265;
>
>
> 2009-09-08 18:20:31 | FPING OK - cocoa.cc.columbia.edu (loss=0%,
> rta=0.270000 ms) |
>
> | 2009-09-08 18:25:45 | FPING OK - cocoa.cc.columbia.edu (loss=0%,
> rta=1.300000 ms) |
>
> | 2009-09-08 18:34:15
> | |
>
> | 2009-09-09 18:48:31
> | |
>
> | 2009-09-09 18:53:32
> | |
>
> | 2009-09-09 18:58:42
> | |
>
> | 2009-09-09 19:03:52
> | |
>
> --
> Cordially,
> Shadhin Rahman
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!http://p.sf.net/sfu/devconf
>
> ------------------------------
>
> _______________________________________________
> Nagios-devel mailing listNagios-devel at lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/nagios-devel
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
>
--
Cordially,
Shadhin Rahman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20091005/7ee9dce6/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list