5 Oct 2005 06:35
nagcron.pl issues
As per the nagmin
guide - I wind up with "Table 'nagmin.hoststatus' doesn't exist". Can some
tell me what I did wrong?
Thanks....Andre
[root <at> localhost conf]# more
/etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
RSYNC_RSH=ssh
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
RSYNC_RSH=ssh
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
*/5 * * * * /opt/nagmin-2.2.0/sbin/nagcron.pl
[root <at> localhost conf]# /opt/nagmin-2.2.0/sbin/nagcron.pl
DBD::mysql::st execute failed: Table 'nagmin.hoststatus' doesn't exist at /opt/nagmin-2.2.0/sbin/nagcron.pl line 66.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at /opt/nagmin-2.2.0/sbin/nagcron.pl line 67.
[root <at> bnc-agent conf]#
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
*/5 * * * * /opt/nagmin-2.2.0/sbin/nagcron.pl
[root <at> localhost conf]# /opt/nagmin-2.2.0/sbin/nagcron.pl
DBD::mysql::st execute failed: Table 'nagmin.hoststatus' doesn't exist at /opt/nagmin-2.2.0/sbin/nagcron.pl line 66.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at /opt/nagmin-2.2.0/sbin/nagcron.pl line 67.
[root <at> bnc-agent conf]#
>>>>>snip from around line 60 of the nacron.pl
file<<<<<<<<<
# Create SQL
String based on query type
$sql = "select hoststatus.host_name,servicestatus.plugin_output,host_status ";
$sql .= "from hoststatus,servicestatus ";
$sql .= "where hoststatus.host_name=servicestatus.host_name AND ";
$sql .= "service_description=\"$info{'service_description'}\" ";
$sth = $dbh->prepare($sql);
$sth->execute();
while ( ($host_name,$output,$status) = $sth->fetchrow_array()) {
$db_file = $host_name.".rrd";
<<<<<<<<end>>>>>>>>>>
$sql = "select hoststatus.host_name,servicestatus.plugin_output,host_status ";
$sql .= "from hoststatus,servicestatus ";
$sql .= "where hoststatus.host_name=servicestatus.host_name AND ";
$sql .= "service_description=\"$info{'service_description'}\" ";
$sth = $dbh->prepare($sql);
$sth->execute();
while ( ($host_name,$output,$status) = $sth->fetchrow_array()) {
$db_file = $host_name.".rrd";
<<<<<<<<end>>>>>>>>>>
RSS Feed