Kaseya Community

Getting more detail information with New Agents installed alerts

  • Hi all,

    At the moment, we can receive alerts for new agent check-in for the first time. In which its setup through Monitor > Agent Monitoring > Alerts > New Agent Installed >

    However, in the content of the email, it’s not including any audit information. It included only Machine ID, group, time of check-in information.

    Most of the time, the new agent went into “unnamed” group if its having different gateway. Sometimes the machine got renamed to something else or deleted without action of anyone in our company. I searched some missing machines (new agent) in the systemlog but they are not there anymore. Therefore, we need more information of the machine within this email alert such can be found during audit. I like to find out the domain that the machine is currently joined to, manufacturer and model details, and so forth.

    I tried creating a post-script that I can attach in New Agent Installed. My ideal post-script is to include email us with more/audited information in it as explained above. But I could not find such variables to do so.

    Does anyone has any idea? Your reply and tips are greatly appreciated.

    Regards,
    Phil

    Legacy Forum Name: Getting more detail information with New Agents installed alerts,
    Legacy Posted By Username: ptun
  • Phil,

    I'm not sure why new agents would be deleting themselves. It sounds like you have some sort of sorting going on by connection gateway, so maybe they are moving themselves into another group.

    As far as your original request for more information, that may take a little more effort. The audit information you are looking for is obtained through the System Info, Baseline, and Lastest audits. These audits are scheduled to run when an agent first checks in, but usually take 5-10 minutes (at best) to run.

    Your idea of launching a script is a good idea and I would suggest going 1 step further. Schedule a script to run upon new agent install that will schedule a second script for 10-15 minutes from now. (You can use .25 Hours to represent 15 minutes.) Is this second script is where you would want to have your agent collect information through variables and email you. There is an "Email" script step where you can define your address, subject, and body. There are also a wealth of variables from inside Kaseya that you can directly access. Take a look at the help topic for Variable Manager (http://help.kaseya.com/WebHelp/en-US/5010000/198.htm) and reference the section on SQL View Data. You will also then need the section on Database Views (http://help.kaseya.com/WebHelp/en-US/5010000/532.htm) to see the tables and variables you have to work with.

    This should get you started.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: CCDave
  • Hi Dave,

    Thanks for your reply. I really appreciate it. It made sense. I sort of knew that audit take time and may not be able to include in the initial email. Thus, in "THEN" statement, I will include pause script and in the next step will run the second script.
    Thank you again for your help.

    Regards,
    Phil

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: ptun
  • ptun
    Hi Dave,

    Thanks for your reply. I really appreciate it. It made sense. I sort of knew that audit take time and may not be able to include in the initial email. Thus, in "THEN" statement, I will include pause script and in the next step will run the second script.
    Thank you again for your help.

    Regards,
    Phil


    No problem. Scripting is a very powerful tool.

    To save you a little more headache, check out the script step "Schedule Script". You can put in whatever delay you want, so you don't have to pause your first script. I use this to schedule a second script I want to have run without tying up my original script.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: CCDave
  • Hi,

    I have completed the script to exactly how I wanted and I will share to here soon. However, I am having a problem with "Send Email" step.

    In the message Body, I like to enter new lines and breaks. I entered the following but its not doing it correctly for me.

    [INDENT]------------------------ \r /r ---------------------\n New Agent Checked-in for the first time. \n---------------------------------------------\n\n\nProdct Name = #varProductName# \n[/INDENT]

    Do I need HTML coding or something?

    I want the actual email to come to me as following sample format.

    --------------------------------------
    New Agent Checked-in for the first time
    --------------------------------------

    Product Name = HP Compaq dc7800p Small Form Factor


    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: ptun