Jump to content

Help with creating new monitors required

Recommended Posts

Hi All, 

1st post on here. We are new to Automate as of January this year and there has been a lot to learn. I have a couple of scenarios which I require help with to create appropriate monitors.

These monitors were possible on Solarwinds but we cant find a way to set them up on Automate. 

1) We require a monitor that checks a file, and if that files time stamp is greater than an hour, then it raises an alert. This monitor is to check that a DVR is working correctly and recording data, if the file its monitoring doesnt get written to in over an hour then there is an issue we need to look at. 

2) We require a monitor that checks the content of a file and looks for the words "Alert" or "Error". Again, this was available in Solarwinds but I cant find anything but to check that a file or directory exists. 

3) We require a monitor that checks a website for the word "Disconnect". Solarwinds used to check a website and if that website loads with a message saying Disconnect then a ticket was raised. 

I have checked the create a monitor via wizard but none of those seem to fit. I believe this may be a new monitor from scratch but again could not find the options that would fit the above scenarios. I believe the system is very powerful and will be capable of the above, I just need a little help to get more familiar with the system.

Appreciate any help. 

Share this post

Link to post
Share on other sites

You can create a powershell script that runs with scheduled windows tasks. If the file is in problem the script create an alert in the event viewer. Then you can create a monitor who checks the custum alert you have created and provide personalized action. The script and the scheduled task can be deployed by a labtech script

Share this post

Link to post
Share on other sites

Thank you for your response. I have had a similar suggestion elsewhere so I will try giving the script a try. 

Share this post

Link to post
Share on other sites
Posted (edited)

Im using this method to monitor admin group on Domain Controller, this script run every 5 minute. I have a monitor set on my Automate to check for Event ID 20


    $CurrentAdminsHash = Get-FileHash -Path '@monitor_folder@\@monitor_file@' | 
      Select-Object -expandProperty Hash
    $Date = Get-Date
    $newAdmins = '@monitor_folder@\@monitor_new@'
    $Change = ''

Get-ADGroupMember -Identity '@AdminGroup@' |
    Select-Object -ExpandProperty samaccountname | 
    Export-Clixml -Path $newAdmins -Force

$NewAdminsHash = Get-FileHash -Path $newAdmins | Select-Object -expandProperty Hash

If ($NewAdminsHash -ne $CurrentAdminsHash){
    $Change = 'Yes'
    $ChangesDetected = 'Domain Admins Group changed detected on: ' + $date
    $ChangesDetected | Out-File -FilePath '@monitor_folder@\@monitor_change@' -Append -Force
} else {

    $Change = 'No'
    $NoChangesDetected = 'No Changes detected on: ' + $Date
    $NoChangesdetected | Out-File -FilePath '@monitor_folder@\@monitor_no_change@' -Append -Force
    Write-EventLog -log HelpOX -source AdMonitor -EntryType Information -eventID 10 -Message "Aucun Changements dans le groupe @AdminGroup@"

If ($Change -eq 'Yes') {

    $change = Compare-Object (get-content C:\HelpOX\Monitors\AdminGroup\CurrentDomainAdmins.xml) -DifferenceObject (get-content C:\HelpOX\Monitors\AdminGroup\NewAdmins.xml) | foreach {$_.InputObject}
    $change = $change -replace "<S>", ''
    $change = $change -replace "</S>", ''

    $MyEventInfo = @{
    Message="ATTENTION Changement dans le groupe Domain Admins, utilisateur(s) suivant a ete modifier: $change"

    Write-EventLog @MyEventInfo
    Get-ADGroupMember -Identity "Domain Admins" | Select-Object -ExpandProperty samaccountname | Export-Clixml -Path 'C:\HelpOX\Monitors\AdminGroup\CurrentDomainAdmins.xml'



Edited by nicecube

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...