Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benjamin Graillot
scripts
Commits
4ae7ea0e
Commit
4ae7ea0e
authored
May 17, 2013
by
Vincent Le gallic
Browse files
[wiki/macro/MonitStatus] /usr/scripts/monit -> /usr/scripts/var/monit
parent
4e62a2b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
wiki/macro/MonitStatus.py
View file @
4ae7ea0e
...
...
@@ -12,7 +12,7 @@ Exemple :
[[MonitStatus(All|Off|service@host)
"""
statusfolder
=
'/usr/scripts/monit/status'
statusfolder
=
'/usr/scripts/
var/
monit/status'
def
NotRunningHosts
()
:
"""
...
...
@@ -21,7 +21,7 @@ def NotRunningHosts() :
"""
hosts
=
[]
for
host
in
os
.
listdir
(
statusfolder
)
:
if
os
.
path
.
getmtime
(
'
/usr/scripts/monit/status/%s'
%
host
)
<
time
.
time
()
-
240
:
if
os
.
path
.
getmtime
(
'
%s/%s'
%
(
statusfolder
,
host
)
)
<
time
.
time
()
-
240
:
hosts
.
append
(
host
)
return
hosts
...
...
Write
Preview
Supports
Markdown
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