Page 2 of 2

Re: Use Amazon SNS for alerts?

Posted: Thu Jun 27, 2019 3:01 pm
by cdienger
I think the problem can be solved by changing this line:

Code: Select all

file = open("snslog", "a")
to:

Code: Select all

file = open("/usr/local/nagios/libexec/snslog", "a")
Make sure that the nagios account has write permissions to it.

Re: Use Amazon SNS for alerts?

Posted: Fri Jun 28, 2019 3:02 am
by tanod
Unfortunately it doesn't change anything, always the same timeout and nothing in my log.

Permissions are 777, and it still work as nagios user manually.

Re: Use Amazon SNS for alerts?

Posted: Fri Jun 28, 2019 8:07 am
by tanod
OK, I tried a different way:
I execute my script with the Global Event Handlers.

And now it works.

But with this solution, I think I cannot manage schedules times ?
I could do it in my script, but when we have to modify them, it won't be as easy as with the graphical interface...

Re: Use Amazon SNS for alerts?

Posted: Fri Jun 28, 2019 1:46 pm
by swolf
Hi @tanod,

Would you be able to try using the event handler with a host/service as before, apply configuration, and then send one of us your system profile while this is configured? I'm not sure we'll be able to find the root cause without checking the configs themselves.

Re: Use Amazon SNS for alerts?

Posted: Mon Jul 15, 2019 9:10 am
by tanod
Hi,

Did you find anything?

Thank you :)

Re: Use Amazon SNS for alerts?

Posted: Tue Jul 16, 2019 3:06 pm
by cdienger
Nothing conclusive yet, but try modifying the command to look like the attached screenshot. I'm not getting timeout errors, but I'm getting errors related to the parsing of these arguments and would like to see if it works for you like it works for me if these are removed.

I'm also using this previously suggested modification to the code:

Code: Select all

    file = open("/usr/local/nagios/libexec/snslog", "a")