Custom Scripts
Custom Scripts are available for Windows Servers and Linux Servers.
Custom Scripts are also available for Avaya equipment types of ACM, ACR, AEP, AES, ASBC, ASM, and esuits by Englebart Software
NOTE
Windows Servers added to VSM, prior to January 2021 will need to first update the Machine Proxy Agent running on them.
It is possible to run Customized PowerShell commandlets or scripts on the servers managed by VSM. This includes the option to raise an alarm when the output matches the value statement.
The output from these scripts can be seen on the View Details page or Dashlet.
Configuring a Custom Script
To configure a custom script, navigate to Equipment Locations > Manage Equipment Page > Edit Equipment (for a Windows or Linux Server)
Under the Custom Scripts Tab, enter the PowerShell command details.
For example:
- Retrieve the last 10 lines of an application log file every 5 minutes:
Get-Content c:/User/AppData\Local\Microsoft\Teams/logs.txt | tail -10
- Retrieve random Internet Cat Facts every 24 hours (or 1440 minutes)
Invoke-WebRequest -Uri 'https://catfact.ninja/fact' -UseBasicParsing | Select-Object -ExpandProperty 'Content' | ConvertFrom-Json
Note: A maximum of ten PowerShell commandlets may be added with minimum repeat Interval of 3 minutes.
Raise an alarm options
The following options are availabale in the drop-down box for "Raise an alarm when output"
- Do Not Raise An Alarm
- Contains
- Does not contain
- Starts with
- Does not start with
- Ends with
- Does not end with
- Greater than
- Less than
- Contains more than
- Contains fewer than
- RegEx match
- RegEx does not match
Viewing Custom Script Output
Commands Run pane
To view command output, navigate to Service Desk > Locations > Manage Equipment and select View Details, for the required equipment.
On the "Commands run" pane you will find your "Custom Scripts" output:
Dashboards
Add a Windows Server Dashlet. or Linux Server Dashlet with "Show Custom Scripts" selected in the settings of the individual dashlets.