NetXMS Support Forum

English Support => General Support => Topic started by: possamai on January 31, 2014, 01:01:02 PM

Title: Action: pushover notification
Post by: possamai on January 31, 2014, 01:01:02 PM
I'm trying to setup  an action that uses the pushover service to notify me when something goes down.
Pushover is an online service that sends notifications to the pushover app.
I can use the following commandline to send such a notification

Quote/usr/local/bin/curl -s -F "token=SOME_ID" -F "user=SOME_OTHER_ID" -F "message=WebService down" -F "sound=gamelan" https://api.pushover.net/1/messages.json

On the commandline of my FreeBSD server this works flawless..
If I add it to the "actions configuration" -> "Execute command on management server" then nothing happens.

Is there a way to find out what's going wrong?
Title: Re: Action: pushover notification
Post by: Victor Kirhenshtein on February 02, 2014, 12:18:16 PM
Hi!

Try to set debug level to 5 and look for messages started with *actions* and RunCommandThread.

Best regards,
Victor
Title: Re: Action: pushover notification
Post by: possamai on February 03, 2014, 01:33:25 PM
Is this the debuglevel for the server or the agent?
The server doesn't seem to care about the debug option and the logs of the agent don't contain any of the keywords you mentioned..
I guess it's not being triggered for some reason..
I'll try figuring out what's going wrong.

Am I right when I asume that the eventprocessor reads from 1 to end? or does it start at the bottom and end with 1 ?
Title: Re: Action: pushover notification
Post by: Victor Kirhenshtein on February 03, 2014, 07:48:51 PM
Debug level for server. How do you set it? You can also change debug level in runtime from server's debug console (accessible in management console via Tools -> Server console) by entering command

debug 5

make sure that you set logging to file (not Windows event log or syslog).

Rules are processed from top to bottom.

Best regards,
Victor
Title: Re: Action: pushover notification
Post by: possamai on February 04, 2014, 11:35:56 AM
tried 2 ways:
1: add "DebugLevel = 5" to netxmsd.conf
2: Add -D5 to commandline when starting it.

Both do not result in extra text in the log.
It does work for the agent btw....

I'll try the server console way :)

I fixed the initial problem though; apparently the action never got executed.
I'm still trying to figure out why but I guess it's because of the order.. I put the event action on the top.
I guess there's a rule halfway that stops the events from being processed any further.

I added the action to the existing "SERVICE_DOWN" event and now it works like a charm.