RE: where to define omsa check of remote host

This forum was archived to /woltlab and is now in read-only mode. Please register a new account on our new community platform.

You can create a thread on the new site and link to an archived thread. This archive is available as knowledge base, safe and secured.

More details here.
  • Hello


    I have several dell servers and would like to use the openmanage plugin. currently the icinga 2 agent is running on one such host and all is fine with the built in checks. I now wish to add the custom openmanage plugin, but was wondering where i should define the apply rules for services and additional configuration for the host object? Should this be done on the config files of the remote host or on the server. If on the server should I modify the configs created under the repository.d directory?


    I am new to icinga 2 and although the documentation explains a lot about the definitions of the objects I could not find where it explains what to do in this situation.


    Thanks
    Karl

  • If you're using a client with local configuration, it's pretty much self-explaining - do it locally in a directory included in icinga2.conf. I would go for the already existing layout below conf.d/ with hosts, services, etc.

  • thank you for the reply. i have been thinking about the local config option, but it will result in a lot of duplication if i have to define the same checks on each server. is there another way of doing these configs (via host groups, apply rules etc..) from the central server? for example, i would like to get to a point where i can define a service as an apply rule like so:


    apply Service "omsa" {
    import "generic-service"
    check_command = ? (not sure how to define this yet)
    assign where host.address && vars.hardware == "dell-server"
    }


    which is then executed on all my remote clients that satisfy the apply rule. I basically only want to define this service once centrally.


    karl

  • There are other modes available, they are described in the documentation separately here - http://docs.icinga.org/icinga2…lient-configuration-modes

  • ok i have decided to use the third option (Master Configuration for Clients as Command Execution Bridge), but my test host has already populated /repository.d with info as if it is going to use a local configuration. How can I get rid of this or should i just leave it?

  • @karlvanderschyff ,
    have you try to complete this


    Shell-Script
    1. apply Service "omsa" {
    2. import "generic-service"
    3. check_command = ? (not sure how to define this yet)
    4. assign where host.address && vars.hardware == "dell-server"
    5. }


    which check_command did you ?
    any suggestion ?

  • @karlvanderschyff


    just share with everyone I used this check_openmanage


    example of checkcommand convert to icinga2



    you will need also add your user that run icinga ("nagios" in my case) to the "/etc/sudoes" file to run the command check_openmanage :


    nagios ALL=NOPASSWD: /usr/lib/nagios/plugins/check_openmanage