Skip to content

Commit 12e239f

Browse files
committed
improve README with icinga2 sample
1 parent a2fe3ac commit 12e239f

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,31 @@ the service itself ::
134134
check_command check_ssh_bgpctl!
135135
}
136136

137+
icinga2 command ::
138+
139+
object CheckCommand "openbgpd" {
140+
import "plugin-check-command"
141+
import "ipv4-or-ipv6"
142+
command = [ PluginDir + "/check_by_ssh" ]
143+
arguments = {
144+
"-H" = "$openbgpd_address$"
145+
"-i" = "$ssh_id$"
146+
"-p" = "$ssh_port$"
147+
"-C" = "$ssh_command$"
148+
}
149+
vars.openbgpd_address = "$check_address$"
150+
vars.ssh_id = "/var/spool/icinga/.ssh/id_rsa"
151+
vars.ssh_port = "$vars.ssh_port$"
152+
vars.ssh_command = "sudo /usr/local/bin/check_openbgpd"
153+
}
154+
155+
icinga2 service ::
156+
157+
apply Service "openbgpd" {
158+
check_command = "openbgpd"
159+
assign where host.name == "hostname"
160+
}
161+
137162
**NRPE**
138163

139164
add this line to /usr/local/etc/nrpe.cfg ::

0 commit comments

Comments
 (0)