DX Unified Infrastructure Management

Expand all | Collapse all

Automated weekly mailer showing Inactive robots

  • 1.  Automated weekly mailer showing Inactive robots

    Posted Feb 08, 2017 01:19 AM

    Hi there,

     

    #Automated mailer showing Inactive robots

     

    I am looking for an automated way to generate a weekly mailer to Admins showing the list of Inactive robots in my UIM environment. Please let me know if anyone has already implemented this and also provide the steps or method followed. I am unable to find an OOB feature for this.

     

    Regards,

    Abhijit



  • 2.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 08, 2017 04:33 AM

    It depends what you call an inactive robot:

    - when you receive the robot inactive message from the hub?

    - if a robot doesn't create a QoS for a certain period?

    - if a robot never created a QoS (or the robot has no additional probes installed other than the default 3)?

    - based on what serverlist (if its based on the servers registered in UIM you need to have an installed robot)?



  • 3.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 09, 2017 04:27 AM

    It needs to show registered hosts having Robot installed which are currently Inactive or where controller is down.



  • 4.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 09, 2017 04:56 AM
      |   view attached

    Attached a sample lua script that can be executed from nas - ao that will search for inactive robots and dead probes.

    (found this script somewhere on a forum)

    The only thing to do is to change the print into a nice report.

    Attachment(s)

    zip
    dead_robots.lua.zip   868 B 1 version


  • 5.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 09, 2017 11:57 PM

    Thanks for sharing the script. Can you please let me know how to call this script every day morning at 8am and send the script output to a set of admins using Nas - AO + Emailgtw probes?



  • 6.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 10, 2017 03:56 AM

    You can run a LUA script outside NAS:

    - install probe nsa to call the lua script outside the nas

    - uncomment the logon statement in the script

    - you can schedule this via the logmon or nexec probe

    example execution statement:

    C:\Progra~2\Nimsoft\sdk\nsa\nsa C:\Progra~2\Nimsoft\probes\service\nas\scripts\dead_robots.lua



  • 7.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 13, 2017 05:44 AM

    I am looking for a way using NAS probe only, so that mailing the script result can also be achieved. Are there any steps for this method?



  • 8.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 13, 2017 07:35 AM

    You can use nas Scheduler options to run the script when you want.



  • 9.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 13, 2017 08:12 AM

    Schedule the script is understood, but how to create an AO profile to mail the script output to a set of Admins daily?



  • 10.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 13, 2017 08:30 AM

    well, you need to save the output to file and use blat or other email commandline tool to send it from lua. Then you can use nas Scheduler for it. Not so easy to do it with AO (alarm)profiles that work with alarms. This script is just gathering data and printing them out. So, some more scripting needed to send that out as email.



  • 11.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 13, 2017 08:39 AM
      |   view attached

    In attachment another version of the same sample script where the output is written into a buffer and that buffer is mailed at the end.

    (you wiill need to change the recipient variable)

    From there it's easy to format the buffer with some HTML tags.

    Attachment(s)



  • 12.  Re: Automated weekly mailer showing Inactive robots

    Posted Feb 15, 2017 05:18 AM

    Thanks a lot for your help. I am able to get an automated mailer daily through nas - scheduler feature.