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
- 41 Getting started
- 25 Read before posting
- 8 Meet and greet
- 237 General
- 64 News and announcements
- 1 Swag
- 1 Roadmap updates
- 79 Resources
- 12 Knowledge Base
- 16 Webinars
- 1 Shared Script Library
- 2 Blog
- 19 Pro Tips
- 27 Got an idea?
- 3 Atera Academy
- 2 ActionAI
- 1 Copilot
- 140 Remote Monitoring and Management
- 84 Remote Monitoring
- 27 Patch Management
- 105 Professional Services Automation
- 64 Helpdesk
- 17 Billing
- 21 Reporting
- 36 Integrations & add-ons
- 20 Integrations
- 10 Add-ons
- 103 Scripting and automations
- 61 Scripts
- 30 Automations