ndo2db database query

Tim Kay tim at dcs.qmul.ac.uk
Thu Jan 31 19:51:07 CET 2008


Hello list,
    I am trying to query the nagios database entries generated by ndo2db 
(Nagios 3.0rc1/ndoutils 1.47b) to pull out only those entries in the 
servicestatus table that are in current_state != 0 and whose 
contactgroup is testing. I have a contact group testing and that contact 
group is set up in the service template for (at the moment) all 
services. I can see the contact group in the SQL contactgroups table and 
I can see the members of the contactgroup in the SQL 
contactgroup_members table but there are no entries in the 
service_contacts table. Is this a config error on my part?

I have:

define contactgroup{
        contactgroup_name       testing
        alias                   Test Group
        members                 testcontact
}

define contact{
        contact_name                    testcontact
        use                             generic-contact
        service_notifications_enabled   1
        alias                           just a test contact
        email                           null at localhost
}

define service{
        name                         infrequent-check-service
        use                          generic-service
        contact_groups               testing
        register                     0
}

define service{
        use                             infrequent-check-service
        host_name                       server1
        service_description             Load Average
        check_command                   check_load
}


the testcontact is notified when the load on server1 exceeds the warn / 
critical limits but I have no way of associating the contact with the 
service just through querying the database....

 Any ideas?

Tim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list