|
@@ -5,11 +5,14 @@
|
|
# Initial release of localcheck in python to get version information of ndsd
|
|
# Initial release of localcheck in python to get version information of ndsd
|
|
#
|
|
#
|
|
# This check should be placed in /usr/lib/check_mk_agent/local and made executable with `chmod +x edir-version.py`
|
|
# This check should be placed in /usr/lib/check_mk_agent/local and made executable with `chmod +x edir-version.py`
|
|
|
|
+# The script assumes that you have exported the environment variables when installing eDirectory, if not it will fail/not get detected on discovery.
|
|
|
|
|
|
import subprocess
|
|
import subprocess
|
|
|
|
|
|
|
|
+# The process to be executed
|
|
myexec = "ndsd"
|
|
myexec = "ndsd"
|
|
|
|
|
|
|
|
+# Attempt to execute the process, if successful output CheckMK formatted data, if not return nothing.
|
|
try:
|
|
try:
|
|
output = subprocess.check_output([myexec, "--version"])
|
|
output = subprocess.check_output([myexec, "--version"])
|
|
output_arr = output.split(' ')
|
|
output_arr = output.split(' ')
|