Online notification
Hello all,
Firstly - apologies as I'm new to Atera, having just come from Datto.
I can see that we can setup notification (availability monitoring) for when devices go offline, but does anyone have any recommendation for an alert/email for when a device [that is normally offline] comes ONline ?
Essentially the opposite of the availability monitoring would be perfect but the option doesn't exist.
Support recommend enabling the emailing of alert resolutions, but this would be a sledgehammer solution and result in emails for ALL resolved alerts for that Customer which is not what is wanted.
Thoughts so far include :
1. Searching event log for "6005" events - but the user might be operating offline for many weeks, then when they come online we get dozens of alerts for every time they started the device ?
2. Scripted pings to Google - but we only want one alert a day really for this.
Perhaps I should get my code on and make something that does what is required but before I do this I thought I would ask you lot :)
Comments
-
@stuarthill I believe a Threshold profile could work for this. Because the event will only be alerted when there is internet connection, I don't think you will be flooded with past events. (If a machine has been offline but powered on and off over the course of a month) However, some testing would be needed to confirm that theory. Let me know how it goes.
0 -
Thanks for the feedback @tanderson I have added that threshold and applied it to a test machine.
This works but only when the machine is restarted while online.
I'll have a play with the scripting ping to google and see if this can also work.2 -
@stuarthill Maybe try with event ID 6009
1 -
As always, thanks @tanderson!
2 -
Apologies @tanderson I have recently been able to get some quiet time to look into this further.
I have found that a Script-based threshold item appears to be working :
The "Online Monitor [WIN].ps1" script contains :
$server = "8.8.8.8" # Google DNS server, replace with any reliable server
$onlineDuration = 5 # Duration in minutes for considering the machine as online
$onlineTime = $nullfunction Test-InternetConnection {
param (
[string]$server
)
$ping = Test-Connection -ComputerName $server -Count 1 -Quiet
return $ping
}while ($true) {
if (Test-InternetConnection -server $server) {
if ($onlineTime -eq $null) {
$onlineTime = Get-Date
} elseif ((Get-Date) - $onlineTime -ge [TimeSpan]::FromMinutes($onlineDuration)) {
Write-Host "The machine is online"
break
}
} else {
$onlineTime = $null
}
Start-Sleep -Seconds 30 # Check every 30 seconds
}
So I've tested it only once, but so far it's a 100% win :)3 -
Thanks @stuarthill !!!
0
Topics
- All Topics
- 42 Getting started
- 26 Read before posting
- 8 Meet and greet
- 257 General
- 71 News and announcements
- 2 Swag
- 1 Roadmap updates
- 83 Resources
- 12 Knowledge Base
- 17 Webinars
- 1 Shared Script Library
- 2 Blog
- 21 Pro Tips
- 28 Got an idea?
- 3 Atera Academy
- 2 ActionAI
- 1 Copilot
- 142 Remote Monitoring and Management
- 85 Remote Monitoring
- 28 Patch Management
- 107 Professional Services Automation
- 65 Helpdesk
- 17 Billing
- 22 Reporting
- 41 Integrations & add-ons
- 22 Integrations
- 11 Add-ons
- 108 Scripting and automations
- 62 Scripts
- 32 Automations