check-consul-service

command module
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

Check Consul Service Build Status

Nagios/Icinga plugin checks consul alive services

Usage:

./check_consul_service
./check_consul_service -consul-addr 127.0.0.1:8500 -user consul-user -password consul-pass
./check_consul_service -consul-addr 127.0.0.1:8500 -w 1 -c 0
./check_consul_service -consul-addr 127.0.0.1:8500 -w 1 -c 0 -services consul,nomad

Icinga configuration

commands.conf:

object CheckCommand "consul-service" {
  command = [ SysconfDir + "/icinga2/scripts/check_consul_service" ]

  arguments = {
    "-consul-addr" = {
      required = true
      value = "$consul_address$"
    }
    "-user" = {
      value = "$consul_auth_user$"
      description = "Consul Auth User"
    }
    "-password" = {
      value = "$consul_auth_password$"
      description = "Consul Auth Password"
    }
    "-scheme" = {
      value = "$consul_scheme$"
      description = "Consul Scheme (http/https)"
    }
    "-w" = {
      value = "$warning$"
    }
    "-c" = {
      value = "$critical$"
    }
  }

  vars.consul_address = "$address$:8500"
  vars.warning = "0"
  vars.critical = "0"
}

Documentation

Overview

Usage of ./check_consul_service: -c int

Critical

-consul-addr string

Consul Address (default "127.0.0.1:8500")

-password string

Consul Auth Password

-scheme string

Consul Scheme (default "http")

-user string

Consul Auth User

-w int

Warning (default 1)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL