scripts in python

Marouane HIMDI marouane.himdi at kereval.com
Thu Apr 23 10:43:35 CEST 2009


Make your script executable whith (chmod +x your_script.py)
And declare a nagios command like this:

# 'check_blabla' command definition
define command{
	command_name	check_blabla
	command_line	path_to_python_bin $USER1$/your_script.py $ARG ... 
	} 
(path_to_python_bin is optional since your script is executable)

Best regards


Dr Marouane HIMDI
Ingénieur R&D/R&D Engineer
 

KEREVAL
4, rue Hélène Boucher
Z.A. Bellevue
35235 Thorigné Fouillard 
Tel : +33 (0)2 23 20 36 64
http://www.kereval.com
 
P Pensez à l'environnement : n'imprimez ce message et ses pièces jointes que
si nécessaire !
-----Message d'origine-----
De : Marcin Salata [mailto:marcin.salata at electrolux.com] 
Envoyé : jeudi 23 avril 2009 10:12
À : nagios-users
Objet : [Nagios-users] scripts in python

Hello

I wrote script in Python. When I run that script with command: python
my_script.py everything is ok. But I don't know how can I run this script
in Nagios. Could you help me?? :)

Best regards / Pozdrawiam

Marcin Salata
IT Specialist

Electrolux Poland Sp. z o.o
ul. K. Odnowiciela 28
58-100 Swidnica

+48 74 6400 611

========================================================================

This email may contain material that is confidential, privileged and/or
attorney work product for the sole use of the intended recipient. If you
are not the intended recipient:
(a) contact the sender and delete all copies,
(b) do not read, print, retain, copy or disseminate this message or any
part of it. Any such unauthorized use may be unlawful.

If the message has been transmitted over public networks it may be corrupt
as Internet communication is not secure.

========================================================================


----------------------------------------------------------------------------
--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list