Scripts triggered by thresholds not in the "Recent Processes" report
I recently realized that when a script is run by a threshold, it doesn't seem to be documented anywhere that I can find. I am looking in the "Audit Log and in the "Recent Processes" report.
We need to be able to see when scripts are being run, regardless of how they are started.
Is this just me, am I looking in the wrong place?
Comments
-
Hi @MJones ,
I can confirm the behavior but I am not sure if I would like to change it. I am having a few threshold configurations which run scripts to either check or change values. This would spam my report.
PowerShell allows to write Eventlogs so for required scripts you can write an eventlog and monitor for these. :-)
0 -
Hi @MJones, Sarah from Atera here.
At the moment, there is no documentation for scripts run by a threshold in reporting. Our RMM team has looked into this, and it is possible it will be developed in the future. However, it is not the plan for now.
In the meantime, you can see the results of a script in the alert itself.
0 -
Hey Sarah,
The alert doesn't show that it ran a script as a result of the alert being triggered at all though in the alert, ticket, or Recent Processes report.
I have a script-based threshold that fires an alert if we have backed up print jobs.
The threshold runs a script "Stuck Print Remediation" if it sees more than 5 pending jobs for 3 minutes.
I need to know that the "Stuck Print Remediation" script ran and what the output\result was. This seems like a pretty basic logging functionality that should be there.0 -
I can look into that event logging, it just seems like it should be logging that it did something somewhere.
0 -
I have resorted to just emailing a log of the script output so that I can know it ran and what it did exactly.
In my opinion, this is still a huge missing feature, we need to be able to track what happens to scripts regardless of where they are run from.
For example:
$txt_File_Output_Path = "Atera_"+$Env:windir+"\temp"+$Env:ComputerName+"Script"+$currDate+".txt"
Start-Transcript -Path $txt_File_Output_Path #Script does a thing #Some-Function Write-Host "Some output." Stop-Transcript $smtpServer = "mail.smtp2go.com" $from = "script@yourdomain.com" $to = "you@yourdomain.com" $subject = "Script Output" $body = "See attached files for script output." $port = 2525 $encrypted = [Text.Encoding]::Utf8.GetString([Convert]::FromBase64String([Text.Encoding]::Utf8.GetString([Convert]::FromBase64String('Double_Base64_String_Goes_Here')))) $smtpPassword = ConvertTo-SecureString -String $encrypted -AsPlainText -Force $smtpCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $from, $smtpPassword $attachments = @($txt_File_Output_Path) Send-MailMessage -SmtpServer $smtpServer -From $from -To $to -Subject $subject -Body $body -Attachments $attachments -UseSsl -Port $port -Credential $smtpCredential -Encoding "utf8"0
Topics
- All Topics
- 40 Getting started
- 24 Read before posting
- 8 Meet and greet
- 220 General
- 59 News and announcements
- Swag
- 1 Roadmap updates
- 68 Resources
- 9 Knowledge Base
- 13 Webinars
- 1 Shared Script Library
- 2 Blog
- 15 Pro Tips
- 26 Got an idea?
- 1 Atera Academy
- 1 ActionAI
- 1 Copilot
- 125 Remote Monitoring and Management
- 78 Remote Monitoring
- 24 Patch Management
- 98 Professional Services Automation
- 61 Helpdesk
- 17 Billing
- 18 Reporting
- 34 Integrations & add-ons
- 20 Integrations
- 10 Add-ons
- 100 Scripting and automations
- 59 Scripts
- 29 Automations