Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Service absents

  1. #1
    Senior Member
    Join Date
    Nov 2011
    Posts
    147

    Service absents

    Bonjour,
    voici un extrait de ma conf.
    Le service "MySQL connection Time" n’apparaît pas. Ni aucun des autres services affectés au hostgroup.
    La même conf marche sous Nagios. (je suis en double run shinken et nagios sur la même conf)



    Code:
    define servicegroup {
        servicegroup_name    MySQL
        alias          Perf counters for MySQL
    }
    
    define service {
        use       generic-service,srv-pnp
        name      MySQL
        servicegroups  MySQL
        hostgroups   mysql-servers
        _mysql_user   nagios
        _mysql_pass   XXXXXXXXXXXXXX
    }
    
    define service {
        use MySQL
        service_description MySQL connection Time
        check_command check_mysql_health!connection-time
    }
    
    define hostgroup {
        hostgroup_name mysql-servers
    	alias      MySQL servers
    }
    define host {
     use  generic-host
     host_name  kitano
     address	xxxxxxxxxxxxx
     hostgroups	linux-servers,http-servers,mysql-servers
     notes latlng: 40.725, -74.007
    }

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Service absents

    In English please

    What I see is the missing : register 0 in the service template. A template should have such entry in the nagios doc, btu maybe one time again it manage things that are said to be un-managed in the documentation >
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3
    Senior Member
    Join Date
    Nov 2011
    Posts
    147

    Re: Service absents

    Code:
    register 0
    added. (My bad)

    Shinken restarted.
    Still, the services based on this templates don't appear.

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Service absents

    What is the line:

    notes latlng: 40.725, -74.007
    ?
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5
    Senior Member
    Join Date
    Nov 2011
    Posts
    147

    Re: Service absents

    It's used for nagmap.

    NagMap is an add-on to display hosts and the relationships on google maps, using the latitude/longitude coordinates.
    Intially, it works only with 1 host.cfg file, and the status.dat but for the last days, I changed it to use livestatus instead. I've also add a small autorefresh ajax function (to avoid google map fees).



  6. #6
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Service absents

    Can you give me your definition for:
    generic-host
    generic-service
    and
    srv-pnp
    ?

    I'll try to reproduce your conf in my dev, because here I don't see why it fail. It's what I use in production (service on hostgroups) and it work well.
    No direct support by personal message. Please open a thread so everyone can see the solution

  7. #7
    Senior Member
    Join Date
    Nov 2011
    Posts
    147

    Re: Service absents

    Templates are for all the host/services. This is a really small installation currently.

    AS you can see, those templates are the default ones.

    Code:
    define host{
        name              generic-host  ; The name of this host template
        notifications_enabled      1    ; Host notifications are enabled
        event_handler_enabled      1    ; Host event handler is enabled
        flap_detection_enabled     1    ; Flap detection is enabled
        failure_prediction_enabled   1    ; Failure prediction is enabled
        process_perf_data        1    ; Process performance data
        retain_status_information    1    ; Retain status information across program restarts
        retain_nonstatus_information  1    ; Retain non-status information across program restarts
            check_command          check-host-alive
            max_check_attempts       10
            notification_interval      0
            notification_period       24x7
            notification_options      d,u,r
            contact_groups         admins
        register            0    ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
        }
    
    define service{
        name              generic-service ; The 'name' of this service template
        active_checks_enabled      1    ; Active service checks are enabled
        passive_checks_enabled     1    ; Passive service checks are enabled/accepted
        parallelize_check        1    ; Active service checks should be parallelized (disabling this can lead to major performance problems)
        obsess_over_service       1    ; We should obsess over this service (if necessary)
        check_freshness         0    ; Default is to NOT check service 'freshness'
        notifications_enabled      1    ; Service notifications are enabled
        event_handler_enabled      1    ; Service event handler is enabled
        flap_detection_enabled     1    ; Flap detection is enabled
        failure_prediction_enabled   1    ; Failure prediction is enabled
        process_perf_data        1    ; Process performance data
        retain_status_information    1    ; Retain status information across program restarts
        retain_nonstatus_information  1    ; Retain non-status information across program restarts
            notification_interval      0        ; Only send notifications on status change by default.
            is_volatile           0
            check_period          24x7
            normal_check_interval      5
            retry_check_interval      1
            max_check_attempts       4
            notification_period       24x7
            notification_options      w,u,c,r
            contact_groups         admins
        register            0    ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        }
    define host {
     name    host-pnp
     register  0
     action_url /demo/pnp4nagios/graph?host=$HOSTNAME$&theme=multisite&baseurl=/demo/check_mk/
    }
    
    define service {
     name    srv-pnp
     register  0
     action_url /demo/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$&theme=multisite&baseurl=/demo/check_mk/
    }

  8. #8
    Senior Member
    Join Date
    Nov 2011
    Posts
    147

    Re: Service absents

    I checked the ouput of config check. Nothing relevent so far.


  9. #9
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,131

    Re: Service absents

    We founded that "hostgroups" in services was an Nagios undocumented keyword :'(

    We add it in the last git version. You can try to upgrade or change it by hostgroup_name.
    No direct support by personal message. Please open a thread so everyone can see the solution

  10. #10
    Senior Member
    Join Date
    Nov 2011
    Posts
    147

    Re: Service absents

    Ok, then, my bad.
    I'm sorry I used this keyword.
    I tried using the one already documented, and the services appear in Shinken. (There's another issue I'm investigating)

    I'll try the version in the git as I can. But honestly, I'd rather use the official (and documented) synthax.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •