Hi all ~
Information about my computer
OS:CentOS 5.4
AP:Nagios3.2.3 and Ndoutils-1.4b9 MySQL 5
I use the ndoutils-1.4b9/db/installdb (it’s script ) to make mysql database which is called “nagios”
Because I need the data , I enter these command below:
mysql > use nagios;
mysql > select * from nagios_servicechecks order by end_time desc limit 1;
it’ output
| servicecheck_id | instance_id | service_object_id | check_type | current_check_attempt | max_check_attempts | state | state_type | start_time | start_time_usec | end_time | end_time_usec | command_object_id | command_args | command_line | timeout | early_timeout | execution_time | latency | return_code | output | long_output | perfdata
| 110040 | 1 | 62 | 0 | 1 | 4 | 0 | 1 | 2010-12-07 23:45:37 |
239374 | 2010-12-07 23:45:37| 341972 | 0 | | | 60 | 0 |
0.1026 | 0.239 | 0 | eth0:UP:1 UP: OK | | |
unfortunate , the field named command_line was empty!
I really need it!
So I look ndo2db.debug
[1291736137.164615] [002.0] [pid=10799] INSERT INTO nagios_servicechecks SET instance_id=‘1’,
service_object_id=‘62’, check_type=‘0’, current_check_attempt=‘1’, max_check_attempts=‘4’, state=‘0’,
state_type=‘1’, start_time=FROM_UNIXTIME(1291736137), start_time_usec=‘164014’, end_time=FROM_UNIXTIME(0),
end_time_usec=‘0’, timeout=‘60’, early_timeout=‘0’, execution_time=‘0.000000’, latency=‘0.163000’, return_code=‘0’,
output=‘eth0:UP:1 UP: OK’, long_output=‘’, perfdata=‘’, command_object_id=‘59’, command_args=‘eth0’,
command_line=‘/usr/local/nagios/libexec/check_snmp_int.pl -H 172.16.1.128 -C public -n eth0’ ON DUPLICATE KEY UPDATE instance_id=‘1’,
service_object_id=‘62’, check_type=‘0’, current_check_attempt=‘1’, max_check_attempts=‘4’, state=‘0’, state_type=‘1’,
start_time=FROM_UNIXTIME(1291736137), start_time_usec=‘164014’, end_time=FROM_UNIXTIME(0), end_time_usec=‘0’, timeout=‘60’,
early_timeout=‘0’, execution_time=‘0.000000’, latency=‘0.163000’, return_code=‘0’, output=‘eth0:UP:1 UP: OK’, long_output=‘’, perfdata=‘’
That’s what I need data in the command_line !
Why it’s empty in the mysql ?
Is something wrong?
plz help me~ thank you
luca
December 9, 2010, 10:45am
2
try executing the query from tha mysql command line or from phpmyadmin. does it throw any errors?
Hello luka~
I queried any data in the mysql environment were nothing wrong…and there were not anything error in mysqld.log and ndo2db.debug too.
should adjusted something?
thx~