Pushover Alert question

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
mrmichaelbeck
Posts: 30
Joined: Tue Jun 03, 2014 3:35 pm
Location: Edmonton
Contact:

Pushover Alert question

Post by mrmichaelbeck »

Hi there,

I'm trying to build an alert from Hostmonitor using a VBScript to Pushover. I can tell you that the scripts that I've put together actually do work outside of HM. I receive the alerts from Pushover whenever I run them from the commmand line.

The current set up is as follows:
- Performance Counter test for % processor time, threshold set to 20.00 (I reverse it to get the test to fail.)

- Alert profile #1 set to Pushover Alert

- Pushover Alert set to Execute external program

- Action properties of the external program set to execute by HostMonitor.

- Command line set to:

'C:\MIC Scripts\Pushover\runcmd.cmd' '%TestName%' '%TestName%' '%TestName%' '%HostURL%' 1 spacealarm

- runcmd.cmd passes all parameters to VBScript (I had the VBScript being called directly but that didn't work either so I decided to try something else). "C:\Windows\System32\cscript.exe" "C:\MIC Scripts\Pushover\Pushover.vbs" "%1 %2 %3 %4 %5 %6

- VBScript then fires the alert off to Pushover.

Running both the VBScript and the cmd wrapper from the command line seems to work fine. I am running everything on a 32bit system with admin rights to the machine. Any thoughts as to what happens when I refresh the test and it seems like the alert isn't going anywhere?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor version?
HostMonitor started as service or application?
Windows?
Service Pack?
UAC enabled?

Standard procedure - what to do when action does not work
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=4804

1) I assume monitoring is started and actions enabled?

2) Action settings: condition to start action?
Usually you start action when test status changes (start when 1 bad result occurs; repeat 1 time). May be you set different settings, e.g. start action after 3rd consecutive failure? May be you set schedule restrictions?

3) If actions enabled, settings correct, test changed its status, then check the log (log file or Quick Log). You should see result or error description there.

4) If HostMonitor says action was started, then you need some diagnostic within your script...

Regards
Alex
mrmichaelbeck
Posts: 30
Joined: Tue Jun 03, 2014 3:35 pm
Location: Edmonton
Contact:

Post by mrmichaelbeck »

Hah, sorry, I totally forgot those.

HM version: 9.90
Running as an application
Windows 7 Pro SP1
UAC is currently enabled at one step above the disabled setting (it's the standard in our environment).

1) yes, monitoring is started (good question - been burned there more than once).

2) The test is set to start after 1, repeat 1. Will running the refresh cause this to re-run the test as expected?

3) These don't seem to be generating much in the way of useful information. I have set the test to use a private log on full and all I'm getting is the test result for the processor time.

4) Good idea. I'll add some logging to the script. Thanks.
mrmichaelbeck
Posts: 30
Joined: Tue Jun 03, 2014 3:35 pm
Location: Edmonton
Contact:

Post by mrmichaelbeck »

Ok, so adding the logging to the script indicates that HostMonitor isn't running the script at all (I've changed it again, this time to call the vbscript directly - the cmd file wasn't logging anything either).

I thought I may have had the script fire properly once, but I think I may have piled up too many tests from the command line, manually.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

If script is not started by HostMonitor, then it's better to check this article:
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=4804
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

These don't seem to be generating much in the way of useful information. I have set the test to use a private log on full and all I'm getting is the test result for the processor time.
Its not about test log. Please check actions log (Quick Log or system log)

Regards
Alex
mrmichaelbeck
Posts: 30
Joined: Tue Jun 03, 2014 3:35 pm
Location: Edmonton
Contact:

Post by mrmichaelbeck »

Good morning,

Thanks again for keeping up on this with me.

The system log did not update over the weekend. Where does the Quicklog log to? I haven't been able to find that yet.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Quick log can be displayed using menu View -> Quick log

Quote from manual:
Quick Log may work in 3 different modes:

Show test results
Show actions
Show test results and actions
You may select Quick Log mode using popup menu that appears when you click right mouse button on Quick Log pane.
Please check for details at:
http://www.ks-soft.net/hostmon.eng/mfra ... ickLogPane
Post Reply