Kaseya Community

Alert Monitor

  • Has anyone used the vMonitorAlarmAlert? Link to help file is http://help.kaseya.com/WebHelp/en-US/5010000/index.htm?toc.htm?443.htm.
    Go to the index and vMonitorAlarmAlert section. I have tried to use the AlertType in a script to see if machine is online when an alert is triggered but cannot get it to work.

    If you have any experience with this I would appreciate some help. Thanks

    Legacy Forum Name: Alert Monitor,
    Legacy Posted By Username: JonJohnston
  • Can you export your monitor set/script so we can see how you have it set up?

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • thirteentwenty
    Can you export your monitor set/script so we can see how you have it set up?


    I am actually looking for a variable to use in a script when an alert is triggered. We are needing to run a script from our Kserver, but I need to be able to tell if the agent is online or offline. I have tried comparing the alert time with last checkin time but that is not always accurate.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: JonJohnston
  • Script Name: Test Agent Online
    Script Description: Test if machine is online, if so sends email saying is online or else triggers alert.

    IF Check Variable
    Parameter 1 : #qt#
    >= :#at#
    THEN
    Send Email
    Parameter 1 : support@domain.com
    Parameter 2 : #id# is online
    Parameter 3 : #id# is online at #qt#.
    OS Type : 0
    ELSE
    Execute Script
    Parameter 1 : Alert to Email/Pager (NOTE: Script reference is NOT imported. Correct manually in script editor.
    Parameter 2 :
    Parameter 3 : 0
    OS Type : 0



    The IF statement is where I am wanting to incorporate the agent on/offline variable. I have tried using #vMonitorAlarmAlert.AlertType# = 15 but that has not worked so if you know the correct syntax please share.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: JonJohnston
  • 2 quick and dirtys for you

    This will check for an offline state. (not useful imo because if the agent is offline the script will not work.)

    Script Name: test
    Script Description: Test for #vMonitorAlarmAlert.AlertType# Variable
    15 -> Agent offline

    IF Check Variable
    Parameter 1 : #vMonitorAlarmAlert.AlertType#
    = :15
    THEN
    Write Script Log Entry
    Parameter 1 : Agent Offline
    OS Type : 0
    ELSE
    Write Script Log Entry
    Parameter 1 : Agent Online
    OS Type : 0


    This will check for an online state
    Script Name: test 2
    Script Description: Test for #vMonitorAlarmAlert.AlertType# Variable
    18 -> Agent online

    IF Check Variable
    Parameter 1 : #vMonitorAlarmAlert.AlertType#
    = :18
    THEN
    Write Script Log Entry
    Parameter 1 : Agent Online
    OS Type : 0
    ELSE

    A bit more useful... but still if the agent is not online the script will not run (read will not move into the else statement)

    Note: both scripts worked on all but one machine I tried it on... not sure why so ymmv

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • Thanks, that is what I was trying to get. In fact that is exactly what I used or at least I think it was, I deleted the info out of my script so cannot remember.
    I will add it back in and do some additional testing.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: JonJohnston
  • Just out of curiosity why not use:

    Monitor > Alerts > (select Agent status) and create a custom set for what ever it is you want to monitor for on/off line status. and have it execute a script as needed

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • WHen using the #vMonitorAlarmAlert.AlertType# variable, I get Failed in the If statement.

    IF Check Variable 

    Parameter 1 : #vMonitorAlarmAlert.AlertType#

    = :18




    The script runs from our Kserver and if an agent goes offline runs to see if it is the agent or internet. See the below thread for more info. I know this is a somewhat redundant thread based on belows but I would like to get this functioning correctly.



    http://community.kaseya.com/xsp/f/27/t/7295.aspx

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: JonJohnston
  • JonJohnston
    WHen using the #vMonitorAlarmAlert.AlertType# variable, I get Failed in the If statement.

    IF Check Variable 

    Parameter 1 : #vMonitorAlarmAlert.AlertType#

    = :18








    Yea, i had that happen to one of my machines im not sure why though. Did that happen to all of your test subjects?





    JonJohnston
    The script runs from our Kserver and if an agent goes offline runs to see if it is the agent or internet. See the below thread for more info. I know this is a somewhat redundant thread based on belows but I would like to get this functioning correctly.




    Ahh, I've been loosely following that thread as I'm having a similar issue... Although I'm working it from a different angle... SNMP... and unfortunatly not so much luck there.



    http://community.kaseya.com/xsp/f/27/t/7295.aspx

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: thirteentwenty
  • [quote user="thirteentwenty"]Yea, i had that happen to one of my machines im not sure why though. Did that happen to all of your test subjects?
    QUOTE]

    So far it has been. When I first tried that variable it failed on all machines I tried (like 10). Yesterday I only tried it on two machines, but need to test it a bit more I guess.

    As far as using SNMP it is a nice feature but the higher ups here do not want to implement it, at least not anytime soon.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: JonJohnston
  • Just did some more testing using that variable on other machines and it is failing on them all.

    I hate to give up, and the solution I have now (comparing alert time with last check-in) works but is not always accurate. For now though the best thing might be to leave it alone and wait for the new release of Kaseya. Based on what I have heard/read there will be more options for scheduling and scripting, should be able to work up something nice at that point.

    Legacy Forum Name: Monitor Sets,
    Legacy Posted By Username: JonJohnston