Kaseya Community

Need help breaking stuff...

  • We are looking at creating a script or scheduled task to run every hour.

    Its purpose would be to create an event viewer error that Kaseya should pick up that should send an email that should be processed by email2db and should create a call in autotask.

    The whole reason for this is to verify every hour that kaseya event viewer monitoring is working.

    Keep in mind I don't want to actually break anything, just create an alert and possible schedule a task to fix whatever I broke.

    Please, I am open to suggestions.

    Thanks

    Legacy Forum Name: Need help breaking stuff...,
    Legacy Posted By Username: GrantB
  • NTEVENT is a command line utility that will write just about anything you want to the Application event log. You can easily run this with an Execute Shell Command in a script.

    [INDENT]Usage: NTEVENT ["message"]

    = ERROR | WARNING | INFORMATION | SUCCESS | FAILURE
    = integer category value
    = integer event ID value
    "message" = message text (in quotes)
    [/INDENT]

    NTEVENT is part of Windows so you already have everything you need.

    Enjoy!

    Tom

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: sequoya
  • I think what your suggesting is a great idea.

    However, I have been unable to access this command in command line.

    Could you provide me with the location of the .exe so I may verify I have it installed (windows XP pro SP3) machine.

    If this works as you descibe this would do excatally what I am trying to accomplish.

    Thanks, Grant

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: GrantB
  • GrantB
    I think what your suggesting is a great idea.

    However, I have been unable to access this command in command line.

    Could you provide me with the location of the .exe so I may verify I have it installed (windows XP pro SP3) machine.

    If this works as you descibe this would do excatally what I am trying to accomplish.

    Thanks, Grant


    Try EVENTCREATE - that should give you what you want.

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: RCS-Michael
  • Edit chinese dating sites love and relationships - General Questions and Discussions - Forums - Kaseya Community 100 free asian dating sites best christian dating sits adult dating in the uk see dating chat largest free dating site


    [edited by: Anonymous at 8:12 AM (GMT -8) on 2-20-2011] Edit chinese dating sites love and relationships - General Questions and Discussions - Forums - Kaseya Community 100 free asian dating sites best christian dating sits adult dating in the uk see dating chat largest free dating site
  • Sorry, my bad. NTEVENT is a little utility I wrote years ago to do this. It's been so long that I forgot it was mine -- kinda blended into the woodwork. :-)

    RCS-Michael is right: EVENTCREATE is the utility that's included with XP now.

    Looking this up I just discovered a new feature of EVENTCREATE that I didn't know was there -- you can write events to ANOTHER system with this. Hmmm... Maybe trigger things to happen elsewhere in the network! THIS will be fun!

    Tom

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: sequoya
  • This is doing excatally what I had intended it to do.

    Using this command...

    eventcreate /T ERROR /ID 10 /SO Kaseya-System-Test /L APPLICATION /D "This is a Test of the Kaseya and Autotask Ticketing System"

    This creates an application alert that I have created a event monitor set to look for.

    I used schedule task to run this task every 2 days at the time indicated.

    HOWEVER,

    Depending on how you all have your stuff configured, I had to create 48 different batch files and schedule 48 different scheduled tasks. The reason being Autotask is configured to ignore additional tickets created with in 48 hours. So if I ran this one command and then ran it again with in that time period it would not create a call. So i created 48 different batch files using 45 different "/ID XX" that way no two calls would be created the same with in that time period. This would not be necessary if you configuring Kaseya to allow duplicate calls to be created and removed the 're-arm period' and if your API/Ticketing vendor does not have some method of handeling duplicate tickets enabled.

    We have the option of disabling the Duplciate ticket handeling, however the same errors are generated over a weekend with servers rebooting and it is easier to deal with on call than two about the same issue.

    Thanks for you help gentlemen,

    Grantb

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: GrantB
  • Grantb,

    If you're just using the ID field to force these to be unique then you could eliminate the extra batch files by using the %time% parameter to add some randomness. Here's an example that might work:

    eventcreate /T ERROR /ID 10%time:~0,2%%time:~3,2% /SO Kaseya-System-Test /L APPLICATION /D "This is a Test of the Kaseya and Autotask Ticketing System"

    This will result in an ID field of 10hhmm where hh is the hour and mm is the minute.

    I'm using the parsing functions that are part of command extensions to reformat the %time% value to eliminate the colon between hours and minutes. There's documentation on this buried in XP but here's the short verison:

    %var:~,%

    Where "var" is the variable you want to parse, is the starting character position (0 based), and is the number of characters. It ain't quite C++ but it adds a lot of power to batch files. Smile

    Tom

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: sequoya