Skip to content

Instantly share code, notes, and snippets.

@rob-mosher
Last active July 3, 2019 13:52
Show Gist options
  • Select an option

  • Save rob-mosher/c9a1be37dc26fdf2377bb7599df0a3cc to your computer and use it in GitHub Desktop.

Select an option

Save rob-mosher/c9a1be37dc26fdf2377bb7599df0a3cc to your computer and use it in GitHub Desktop.

Revisions

  1. hailthemelody revised this gist Jun 10, 2016. No changes.
  2. hailthemelody revised this gist Jun 10, 2016. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions todo_and_thankyou.txt
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    /* this file is not needed for the above to work, it is merely */


    /* TODO
    * - add optional descriptions to vars.service_win_services examples
    *
    * THANK YOU
    * to michi's http_vhost tutorial at the link below for the starting point for my gist:
    * http://www.legendiary.at/2015/01/10/monitoring-vhosts-with-icinga-2-and-icinga-web-2/
    */
  3. hailthemelody created this gist Jun 10, 2016.
    10 changes: 10 additions & 0 deletions hosts.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    /*
    * Add the following within the "object Host NodeName { HERE }" block
    *
    * Service names can be found in "services.msc" by right-clicking
    * the desired service and selecting "Properties"
    */

    vars.service_win_services["Service name 1"] = {}
    vars.service_win_services["Service name 2"] = {}
    vars.service_win_services["Service name 3"] = {}
    12 changes: 12 additions & 0 deletions services.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    /* add the following anywhere within this file */

    apply Service "service-" for (service_win_service => config in host.vars.service_win_services) {
    import "generic-service"

    check_command = "service-windows"

    vars += config
    vars.service_win_service = service_win_service

    notes = "Service check for " + service_win_service
    }
    3 changes: 3 additions & 0 deletions todo_and_thankyou.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    /* this file is not needed for the above to work, it is merely */