Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picomon
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Heintz
picomon
Commits
bd156357
Commit
bd156357
authored
Oct 16, 2017
by
glucas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding new check: CheckTLSCert{4,6} for testing x509 certificate's expiration over TLS connection.
parent
acf7b96d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
picomon/checks.py
picomon/checks.py
+26
-0
No files found.
picomon/checks.py
View file @
bd156357
...
...
@@ -308,3 +308,29 @@ class CheckJabber4(CheckJabber, Check4):
class
CheckJabber6
(
CheckJabber
,
Check6
):
pass
class
CheckTLSCert
(
Check
):
def
build_command
(
self
):
command
=
[
'/usr/lib/nagios/plugins/check_http'
,
'--ssl'
,
'--sni'
,
'-C'
,
str
(
self
.
_options
.
get
(
'warn'
,
7
),
'-t'
,
str
(
self
.
timeout
)]
if
'port'
in
self
.
_options
:
command
+=
[
'-p'
,
str
(
self
.
_options
[
'port'
])]
if
'vhost'
in
self
.
_options
:
command
+=
[
'-H'
,
str
(
self
.
_options
[
'vhost'
])]
command
+=
[
self
.
dest
]
return
command
def
check
(
self
):
command
=
self
.
build_command
()
return
self
.
exec_with_timeout
(
command
,
timeout
=
self
.
timeout
+
1
)
class
CheckTLSCert4
(
CheckTLSCert
,
Check4
):
pass
class
CheckTLSCert6
(
CheckTLSCert
,
Check6
):
pass
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