Code

nagixsc.git
14 years agoRework http2nagios (and xml2nagios) and add SSL
Sven Velt [Tue, 9 Feb 2010 22:13:03 +0000 (23:13 +0100)]
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 :)

14 years agoconf2http can now use SSL!
Sven Velt [Tue, 9 Feb 2010 14:03:05 +0000 (15:03 +0100)]
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

14 years agoEnhance conf2http (and conf2xml)
Sven Velt [Wed, 13 Jan 2010 23:20:00 +0000 (00:20 +0100)]
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().

14 years agoMove encoding check to "nagixsc.py"
Sven Velt [Wed, 13 Jan 2010 22:09:55 +0000 (23:09 +0100)]
Move encoding check to "nagixsc.py"

14 years agoMove "exec_check" to nagixsc.py
Sven Velt [Wed, 13 Jan 2010 21:55:15 +0000 (22:55 +0100)]
Move "exec_check" to nagixsc.py

14 years agoAllow command lines with quotes
Sven Velt [Fri, 8 Jan 2010 13:48:12 +0000 (14:48 +0100)]
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.

14 years agoAdded check to reset future timestamps
Sven Velt [Tue, 5 Jan 2010 14:03:54 +0000 (15:03 +0100)]
Added check to reset future timestamps

14 years agoOutput service only if description is set
Sven Velt [Fri, 18 Dec 2009 14:50:07 +0000 (15:50 +0100)]
Output service only if description is set

14 years agoConfig files and cmd line options for daemons
Sven Velt [Thu, 17 Dec 2009 23:59:30 +0000 (00:59 +0100)]
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

14 years agoImport md5 from hashlib/md5, dep. on Py version
Sven Velt [Wed, 16 Dec 2009 16:35:45 +0000 (17:35 +0100)]
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.

14 years agoAgain still PoC, but reworked w/o CherryPy
Sven Velt [Mon, 14 Dec 2009 23:38:16 +0000 (00:38 +0100)]
Again still PoC, but reworked w/o CherryPy

14 years agoStill PoC, but reworked w/o CherryPy
Sven Velt [Mon, 14 Dec 2009 23:07:43 +0000 (00:07 +0100)]
Still PoC, but reworked w/o CherryPy

14 years agoFix "file -1 seconds old" bug
Sven Velt [Mon, 14 Dec 2009 23:11:40 +0000 (00:11 +0100)]
Fix "file -1 seconds old" bug

14 years agoWIP: PoC of "http2nagios" / rename "cgi"->"http"
Sven Velt [Fri, 11 Dec 2009 11:58:29 +0000 (12:58 +0100)]
WIP: PoC of "http2nagios" / rename "cgi"->"http"

14 years agoWIP: PoC of conf2cgi/Nag(ix)RPE \o/
Sven Velt [Tue, 8 Dec 2009 22:45:19 +0000 (23:45 +0100)]
WIP: PoC of conf2cgi/Nag(ix)RPE  \o/

14 years agoFilter option build into nagixsc_conf2xml (-H/-D)
Sven Velt [Tue, 8 Dec 2009 21:57:12 +0000 (22:57 +0100)]
Filter option build into nagixsc_conf2xml (-H/-D)

14 years agoAllow HTTP username and password (-l/-a)
Sven Velt [Tue, 8 Dec 2009 13:26:58 +0000 (14:26 +0100)]
Allow HTTP username and password (-l/-a)

14 years agoAdded host checks
Sven Velt [Tue, 8 Dec 2009 11:06:13 +0000 (12:06 +0100)]
Added host checks

14 years agoTypo in QUICKSTART.de.txt, thx to Sven Jeck
Sven Velt [Fri, 4 Dec 2009 08:47:50 +0000 (09:47 +0100)]
Typo in QUICKSTART.de.txt, thx to Sven Jeck

14 years agoWIP: Generate minimal, hardcoded Nagios cfg from XML
Sven Velt [Mon, 30 Nov 2009 10:53:31 +0000 (11:53 +0100)]
WIP: Generate minimal, hardcoded Nagios cfg from XML

14 years agoInitial commit
Sven Velt [Sun, 29 Nov 2009 19:26:08 +0000 (20:26 +0100)]
Initial commit