Duncan Ferguson wrote:
Can you check to ensure the correct daemons are running on your
system, i.e. opsviewd, import_ndoslogsd and nagios - at the moment I
can only think the runtime database isn't getting updated correctly so
the status views are not up to date
Hi,
The daemons are all running.
However when I enabled debugging and restarted the daemons I saw this
message in the logs:
[ndoutils_configdumpend] [FATAL] DBD::mysql::db do failed: SELECT
command denied to user 'opsviewruntime'@'x.x.x.x' for table 'contacts'
[for Statement "
INSERT INTO opsview_contact_services_temporary
SELECT c.id, s.service_object_id
FROM
opsview.contacts c,
nagios_objects o,
nagios_contactgroup_members cgm,
nagios_contactgroups cg,
nagios_service_contactgroups scg,
nagios_services s
WHERE
o.objecttype_id=10
AND binary c.username = o.name1
AND o.object_id = cgm.contact_object_id
AND cgm.contactgroup_id = cg.contactgroup_id
AND cg.contactgroup_object_id = scg.contactgroup_object_id
AND scg.service_id = s.service_id
AND s.config_type = 1
"]
Firstly, Im not sure if this is related but if so, I dont actually have
a database called just "opsview", I named them according to function.
1. Could be a permissions issue with MySQL although my user
"opsviewruntime" has % for the hosts allowed to talk to the db as that user.
It is a shared-storage failover cluster setup so the queries could come
from one of two IP's depending on which node is primary, it is now
running on the secondary node.
Perhaps I need to run /usr/local/nagios/bin/db_mysql again to make sure
both nodes have identical db operation permissions?
2. Looking at the SQL in the script that performs this function:
(nagios/bin/ndoutils_configdumpend)
my $temp_table=copy_table('opsview_contact_services', "temporary");
$dbh->do("
INSERT INTO $temp_table
SELECT c.id, s.service_object_id
FROM
opsview.contacts c,
I noticed that the variable $opsview_db is used in other places in the
script, should it be $opsview_db.contacts instead of hardcoding the db
name or am I way off?
Thanks,
Andy
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users