Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
arn
picomon
Commits
48141b02
Commit
48141b02
authored
Aug 03, 2016
by
glucas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change binary (and check definition) for check OpenVPN.
parent
659462e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
README.md
README.md
+1
-0
picomon/checks.py
picomon/checks.py
+23
-8
No files found.
README.md
View file @
48141b02
...
...
@@ -17,6 +17,7 @@ available under Debian in package `nagios-plugins-basic`.
The DNS zone check calls
[
Bortzmeyer's
](
https://github.com/bortzmeyer/check_dns_soa
)
(introduced
[
here
](
http://www.bortzmeyer.org/go-dns-icinga.html
)
).
The OpenVPN check calls
[
Liquidat's
](
https://github.com/liquidat/nagios-icinga-openvpn/
)
.
Usage
-----
...
...
picomon/checks.py
View file @
48141b02
...
...
@@ -259,15 +259,15 @@ class CheckSMTP6(CheckSMTP, Check6):
class
CheckOpenVPN
(
Check
):
def
build_command
(
self
):
command
=
[
'/usr/lib/nagios/plugins/check_openvpn'
,
'-p'
,
"443"
,
'--timeout'
,
str
(
self
.
timeout
),
str
(
self
.
dest
)]
return
command
def
check
(
self
):
command
=
[
'/usr/lib/nagios/plugins/check_udp'
,
'-H'
,
self
.
dest
,
'-p'
,
"1194"
,
'-m'
,
"1"
,
'-M'
,
"ok"
,
# actualy just having a reply is enough
'-s'
,
"
\x38\x01\x01\x01\x01\x01\x01\x01\x42
"
,
'-e'
,
"@"
,
'-t'
,
str
(
self
.
timeout
)]
command
=
self
.
build_command
()
return
self
.
exec_with_timeout
(
command
,
timeout
=
self
.
timeout
+
1
)
...
...
@@ -279,6 +279,21 @@ class CheckOpenVPN6(CheckOpenVPN, Check6):
pass
class
CheckOpenVPNTCP
(
CheckOpenVPN
):
def
check
(
self
):
command
=
self
.
build_command
()
command
.
insert
(
1
,
'-t'
)
return
self
.
exec_with_timeout
(
command
,
timeout
=
self
.
timeout
+
1
)
class
CheckOpenVPNTCP4
(
CheckOpenVPNTCP
,
Check4
):
pass
class
CheckOpenVPNTCP6
(
CheckOpenVPNTCP
,
Check6
):
pass
class
CheckJabber
(
Check
):
def
check
(
self
):
command
=
[
'/usr/lib/nagios/plugins/check_jabber'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment