2nd try: Dots are a security hole in file names
Signed-off-by: Sven Velt <sven@velt.de>
Signed-off-by: Sven Velt <sven@velt.de>
Dots are a security hole in filenames
Signed-off-by: Sven Velt <sven@velt.de>
Signed-off-by: Sven Velt <sven@velt.de>
Fix "active" mode to check if only 1 result in XML
Signed-off-by: Sven Velt <sven@velt.de>
Signed-off-by: Sven Velt <sven@velt.de>
Filter out host check if -D specified
Signed-off-by: Sven Velt <sven@velt.de>
Signed-off-by: Sven Velt <sven@velt.de>
Disable SSL in sample-configs/*.cfg
Could be confusing because of not existing cert/key file.
Signed-off-by: Sven Velt <sven@velt.de>
Could be confusing because of not existing cert/key file.
Signed-off-by: Sven Velt <sven@velt.de>
Added check if command line is empty
An empty command line entry in conf file did raise an error within
subprocess call. Now an unknow check result is returned.
Signed-off-by: Sven Velt <sven@velt.de>
An empty command line entry in conf file did raise an error within
subprocess call. Now an unknow check result is returned.
Signed-off-by: Sven Velt <sven@velt.de>
HTTP-Server can now daemonize
Added daemonize() to nagixsc and "-d" or "--daemon" to conf2http and
http2nagios.
Signed-off-by: Sven Velt <sven@velt.de>
Added daemonize() to nagixsc and "-d" or "--daemon" to conf2http and
http2nagios.
Signed-off-by: Sven Velt <sven@velt.de>
Rename scripts and python module
Put nagixsc.py into nagixsc/__init__.py to use and install it as an usul
Python module.
Renamed dummy_* to more "offical" names.
Signed-off-by: Sven Velt <sven@velt.de>
Put nagixsc.py into nagixsc/__init__.py to use and install it as an usul
Python module.
Renamed dummy_* to more "offical" names.
Signed-off-by: Sven Velt <sven@velt.de>
Small fix if run in "checkresult" mode
Signed-off-by: Sven Velt <sven@velt.de>
Signed-off-by: Sven Velt <sven@velt.de>
Added --nossl to HTTP daemons
Disable SSL on command line even if it's activated in cfg file.
Signed-off-by: Sven Velt <sven@velt.de>
Disable SSL on command line even if it's activated in cfg file.
Signed-off-by: Sven Velt <sven@velt.de>
conf2xml: Added HTTP POST support
It's not longer necessary to create and XML file, save it and
HTTP(S)-POST it with curl. Just use a URL as output file, add -l/-a if
login is required and be happy :)
It's not longer necessary to create and XML file, save it and
HTTP(S)-POST it with curl. Just use a URL as output file, add -l/-a if
login is required and be happy :)
Small syntax fix
Fix filename
Rework http2nagios (and xml2nagios) and add SSL
"nagixsc_http2nagios.py" does not call "nagixsc_xml2nagios.py" as a subprocess
anymore.
Instead there are 2 function "dict2out_passive" for passive checks and
"dict2out_checkresult" for check result creation.
And... nagixsc_http2nagios now also supports SSL so noone has to send
his authentication data unencrypted over the network :)
"nagixsc_http2nagios.py" does not call "nagixsc_xml2nagios.py" as a subprocess
anymore.
Instead there are 2 function "dict2out_passive" for passive checks and
"dict2out_checkresult" for check result creation.
And... nagixsc_http2nagios now also supports SSL so noone has to send
his authentication data unencrypted over the network :)
conf2http can now use SSL!
Have a look at the conf2http.cfg! It *needs* two more options, "ssl" and
"sslcert". To be sure use a *FULL* pathname to key/cert file.
Create a key and self-signed certificate with:
% openssl req -x509 -nodes -days 365 -newkey rsa:1024 \
-keyout server.pem -out server.pem
Have a look at the conf2http.cfg! It *needs* two more options, "ssl" and
"sslcert". To be sure use a *FULL* pathname to key/cert file.
Create a key and self-signed certificate with:
% openssl req -x509 -nodes -days 365 -newkey rsa:1024 \
-keyout server.pem -out server.pem
Enhance conf2http (and conf2xml)
"nagixsc_conf2http.py" does not call "nagixsc_conf2xml.py" as a
subprocess anymore.
Instead "conf2dict()" is now a function in "nagixsc.py" and can be
called without fork()/exec().
"nagixsc_conf2http.py" does not call "nagixsc_conf2xml.py" as a
subprocess anymore.
Instead "conf2dict()" is now a function in "nagixsc.py" and can be
called without fork()/exec().
Move encoding check to "nagixsc.py"
Move "exec_check" to nagixsc.py
Allow command lines with quotes
Until now command lines where split at spaces (" ") but if you want some
string arguments including spaces ("-e '220 mail.server.de'") this
doesn't work anymore. So now we use "shlex.split()" for this.
Until now command lines where split at spaces (" ") but if you want some
string arguments including spaces ("-e '220 mail.server.de'") this
doesn't work anymore. So now we use "shlex.split()" for this.
Added check to reset future timestamps
Output service only if description is set
Config files and cmd line options for daemons
Moved config files from examples/ to sample-configs/conf/, new config
files for daemons in sample-configs/
Changed path names in QUICKSTART.de.txt
Moved config files from examples/ to sample-configs/conf/, new config
files for daemons in sample-configs/
Changed path names in QUICKSTART.de.txt
Import md5 from hashlib/md5, dep. on Py version
2.4: Only "md5" available
2.5: "md5" and "hashlib" work
2.6: Only "hashlib"
So try to "from hashlib import md5" and if it doesn't work just do a
"from md5 import md5" and just use "md5(___).hexdigest()" in the code.
2.4: Only "md5" available
2.5: "md5" and "hashlib" work
2.6: Only "hashlib"
So try to "from hashlib import md5" and if it doesn't work just do a
"from md5 import md5" and just use "md5(___).hexdigest()" in the code.
Again still PoC, but reworked w/o CherryPy
Still PoC, but reworked w/o CherryPy
Fix "file -1 seconds old" bug
WIP: PoC of "http2nagios" / rename "cgi"->"http"
WIP: PoC of conf2cgi/Nag(ix)RPE \o/
Filter option build into nagixsc_conf2xml (-H/-D)
Allow HTTP username and password (-l/-a)
Added host checks
Typo in QUICKSTART.de.txt, thx to Sven Jeck
WIP: Generate minimal, hardcoded Nagios cfg from XML
Initial commit