submit_check_result script fails when called by another script

Bug #369413 reported by slaroy
2
Affects Status Importance Assigned to Milestone
nagios3 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: nagios3-common

When calling submit_check_result from another script (here snmptt), submit_check_result fails.

Calling submit_check_result from the command line with sudo works properly.

Proposed fix:

replace #!/bin/sh
with #!/bin/bash

This fix works in my setup

Revision history for this message
Thierry Carrez (ttx) wrote :

Could you precise the version of nagios3-common you're using, and define "fails" (ideally, attach a minimal script that would allow to reproduce the issue) ?
I'm able to run submit_check_result from another script without issues and it doesn't seem to include any bashisms...

Changed in nagios3 (Ubuntu):
status: New → Incomplete
Revision history for this message
slaroy (slaroy) wrote :

I installed the snmptt script in daemon mode (http://www.snmptt.org/docs/snmptt.shtml), and set snmptt to call submit_check_result upon the receipt of an unknown trap. The above link should tell you how to set it up in a couple of minutes, and I've included my snmptt.ini file.

When snmptt receives an unknown trap, it should launch submit_check_result, but without the change (which I found recommended here: http://forums.meulie.net/viewtopic.php?f=59&t=4342&p=15475&hilit=snmptt#p15475 ) it does nothing, and I can't seem to find any errors in the log files explaining why.

It just occurred to me that perhaps I've filed this bug in the wrong place. Maybe this is a bug with snmptt? I'm not sure. All I know that snmptt launches submit_check_result now, but it didn't before.

Revision history for this message
Thierry Carrez (ttx) wrote :

I can't see a bug in nagios3, so this is probably linked to the way snmptt calls that external command... Please reopen if, after analyiss on the snmptt side, you can point to a bug in nagios3. Thanks for your help !

Changed in nagios3 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.