17.04.2011, 00:43 UTC+2

Sie sind nicht angemeldet.

event handlers

Anfänger

Beiträge: 1

Anzahl Nagios-Server: 1

Nagios-Version(en): 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 21

Anzahl Services: 35

Betriebssystem(e): Ubuntu

Plugin-Version(en): 1.4.15

NDO-Version: 1

1

15.04.2011, 19:41

event handlers

Hi

I have created one event handler for one of the services that i am monitoring. this is the event log
(for this post i have modified the service)

-------------
[04-15-2011 12:07:39] SERVICE EVENT HANDLER: Gssdev;Internet Explorer;CRITICAL;SOFT;2;start-testfile

[04-15-2011 12:07:39] SERVICE ALERT: Gssdev;Internet Explorer;CRITICAL;SOFT;2;iexplore.exe: not running

-----------

now start-testfile.sh does executes but due to user rights issue (i think), ubuntu does not allows it to continue.


i am able to execute this script from the terminal, but not through nagios :(


i have modified my sudoers file by adding these lines
------------------

nagios ALL=NOPASSWD: ALL

###and got this from another article, so i have added these lines also

User_Alias NAGIOS = nagios,nagcmd
Cmnd_Alias NAGIOSCOMMANDS = /sbin/service
Defaults:Nagios !requiretty
NAGIOS ALL=ALL NOPASSWD:NAGIOSCOMMANDS

----------------

now, just to check, i deleted my original code and entered this in start-testfile.sh

------------------
cd /tmp/
mkdir iexplore
exit 0

-------------------
after doing this, the script was creating a directory in tmp folder, but not anywhere else. so my guess is user rights is preventing the execution of the script...
Can you guys please suggest how can i run any type of script from the event handler...i have been trying since last 2 days..thank you

and also if you have any good article on event handlers and on their setup, please post the link

OS- ubuntu 10.10

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »« (15.04.2011, 21:21)


Wolfgang

Erleuchteter

Beiträge: 5 234

Geschlecht: Männlich

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.1

Icinga-Version(en): Icinga 1.0.1

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: >70

Anzahl Services: >200

Betriebssystem(e): SLES10

Plugin-Version(en): 1.4.11

Sonstige Addon's: NRPE 2.6, NSCA 2.7, PNP 0.4.14 / 0.6

2

15.04.2011, 23:24

Zitat

and also if you have any good article on event handlers and on their setup, please post the link
What's wrong with the Nagios documentation?
Please show the contents of start-testfile and the definition of the service.
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

Ähnliche Themen