Event handler not working
Re: Event handler not working
Hug the grep. Seduce the sed. Swear fealty to the awk. Unite the logs under one motd banner. Your quest is the search for the holy regex.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Event handler not working
The | is thy sword and the 2>&1 thy armor.abrist wrote:Hug the grep. Seduce the sed. Swear fealty to the awk. Unite the logs under one motd banner. Your quest is the search for the holy regex.
Former Nagios employee
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Event handler not working
Yeah...... so let us know what you come up with!
Re: Event handler not working
OMFG - I changed the script to only have 'exit 0' in it, everything else was commented out and I still get the error. I see nothing in messages from nrpe either.
p.s. The FNG made me LOL
p.s. The FNG made me LOL
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Event handler not working
if I add an echo "test" before the exit 0 and run the command, I get no error...AHHHH
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Event handler not working
Is it working though when you add the echo?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Event handler not working
Let me try and give an overview again, as we've tried so many things.......
If I login to the server and su as nagios, I can run the script and it performs perfectly.
If from the Nagios server, I try and run the script using NRPE from the cli or eventhandler it does not function, no matter what I do to the script. NRPE is configured to run as the user nagios on the destination server.
The command that is not working is this:
And in the sudoers file I have this:
Which should be proven good since it works when I am logged in as nagios locally on that server.
If I login to the server and su as nagios, I can run the script and it performs perfectly.
If from the Nagios server, I try and run the script using NRPE from the cli or eventhandler it does not function, no matter what I do to the script. NRPE is configured to run as the user nagios on the destination server.
The command that is not working is this:
Code: Select all
/usr/bin/find /var/bu/wlanadmin/*.gpg -mtime +5 -exec sudo /bin/rm {} \;
/usr/bin/find /var/bu/wlanadmin/*.cfg -mtime +5 -exec sudo /bin/rm {} \;
Code: Select all
User_Alias NAGIOSXI=nagios
NAGIOSXI ALL = NOPASSWD:/bin/rm
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Event handler not working
I would agree. Do you want to escalate to a remote tomorrow? I am fresh out of options. . .BanditBBS wrote:Which should be proven good since it works when I am logged in as nagios locally on that server.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Event handler not working
Sure Andy, me and my linux admin are both clueless as to why it isn't working. I should be good all day.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Re: Event handler not working
Great. Shoot [email protected] an email and we will schedule up a remote.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.