How can I automate running AAI console reports?
search cancel

How can I automate running AAI console reports?

book

Article ID: 219768

calendar_today

Updated On:

Products

Automic Automation Intelligence

Issue/Introduction

How can I automate running AAI console reports?

Environment

Release : 6.3.0

Component : AUTOMIC AUTOMATION INTELLIGENCE INTEGRATION FOR BMC

Resolution

There is an included script run_reports.py in the /<install dir>/batch/lib directory that will allow you to run repots via the AAI CLI.

 

To run the report, SSH or RDP to the AAI server and change directory to /<install dir>/batch/

Run the script on Windows:

run.at lib\run_report.py report_name [email addresses]

Run the script on Unix:

/run.pl lib/run_report.py report_name [email addresses]

 

Here is an example of the CLI script that can run and send the report to an email address.

On the AAI server run the following:

<Install Directory>\batch\run.bat lib\run_report.py "ReportName" <emailAddress>@domain.com

 

The minimum syntax is:

run.bat lib/run_report.py report_name [email addresses]

 

You can also copy over the full <Install Directory>\batch\ directory to your desktop and run this remotely.

It would need access to port 8080 but so does the AAI client so it should work.

 

If running it remotely you need to specify the server, port, login etc.

 

Here are all of the parameters you can pass in the CLI for this:

 

optional parameters:
    -server: hostname for connecting to JAWS; default: localhost
    -port: port for connecting to JAWS; default: 8080
    -user: user for connecting to JAWS
    -password: password for connecting to JAWS
    -smtphost: mail server location; default: localhost
    -f: name of a file containing recipient addresses, one per line.
    -attach: [True or False] if 'False', the report is not attached to the email. If not 'False',
                and '-attach' is included, the report is attached to the email.
    -output: filename to save the report to. The path to the file will be sent in the email.
    -overwrite: [True or False] if 'True', the file is overwritten if it is already present.
                Otherwise, a number is appended to the name to create a unique name.

 

Additional Information

https://docs.automic.com/documentation/webhelp/english/ALL/components/TERMA/latest/AAI%20Guides/Content/AAI_Topics/Included_Scripts_3.htm?Highlight=run_report.py