Search found 6 matches

by filipe.avelino1
Mon Dec 15, 2014 5:22 pm
Forum: Open Source Nagios Projects
Topic: Plugin return report NULL
Replies: 10
Views: 5365

Re: Plugin return report NULL

Return:

Atachament
by filipe.avelino1
Mon Dec 15, 2014 3:07 pm
Forum: Open Source Nagios Projects
Topic: Plugin return report NULL
Replies: 10
Views: 5365

Re: Plugin return report NULL

My permissions
I could not use the su command nagios returns the account is not available at the time. I execute echo $? , return 1
by filipe.avelino1
Mon Dec 15, 2014 2:50 pm
Forum: Open Source Nagios Projects
Topic: Plugin return report NULL
Replies: 10
Views: 5365

Re: Plugin return report NULL

Working, but i set this values manually See, I commented the code that instantiates the serial port cli: [root@tux-mateus plugins]# python tcc2.py OK: Sem Ameacas #!/usr/bin/python import pynagios import serial from pynagios import Plugin, Response valor = 0 class MyCheck(Plugin): def check(self): #...
by filipe.avelino1
Mon Dec 15, 2014 2:39 pm
Forum: Open Source Nagios Projects
Topic: Plugin return report NULL
Replies: 10
Views: 5365

Re: Plugin return report NULL

Sure, Not working #!/usr/bin/python import pynagios import serial from pynagios import Plugin, Response class MyCheck(Plugin): def check(self): ser = serial.Serial('/dev/ttyACM0',9600,timeout=0) if str(ser.read()) == '1': return Response(pynagios.CRITICAL, "Intrusos Detectados") else: retu...
by filipe.avelino1
Mon Dec 15, 2014 1:16 pm
Forum: Open Source Nagios Projects
Topic: Plugin return report NULL
Replies: 10
Views: 5365

Re: Plugin return report NULL

I think not, because I run manually and works normally. In this example that I said the passage that communicates with the serial port and I configured the manual value
by filipe.avelino1
Mon Dec 15, 2014 12:54 pm
Forum: Open Source Nagios Projects
Topic: Plugin return report NULL
Replies: 10
Views: 5365

Plugin return report NULL

Good afternoon, I developed a plugin in Python to read a value of a presence sensor connected through the serial port with arduino. I used several techniques, the latest version used the pynagios library. I realized that by removing the code that connects the serial port the plugin works normally, b...