Build precise queries to find exactly what you need
Press ESC to close
With my regional seetings I had to modify the script, I also added some performance datas. The modifications do start afet line 48 :
$now = (Get-Date).AddDays(-$period) $lastend = (Get-BEJobHistory -Name $name -FromLastJobRun).EndTime.ToString(“dd.MM.yyyy HH:mm”) $laststart = (Get-BEJobHistory -Name $name -FromLastJobRun).StartTime $jobsize = (Get-BEJobHistory -Name $name -FromLastJobRun).TotalDataSizeBytes/1000000000 $jobsize = “{0:N0}” -f $jobsize $jobduration = (Get-BEJobHistory -Name $name -FromLastJobRun).ElapsedTime.Hours*60 +(Get-BEJobHistory -Name $name -FromLastJobRun).ElapsedTime.Minutes $name = ” + $name + ”
if ($now -gt $laststart) { Write-Host “CRITICAL! Last run of job: $name on $lastend.” exit 2 } else { $jobsize=$jobsize+”B” Write-Host “OK Job $name ($jobsize GB) completed successfully on $lastend in $jobduration minutes.|Job_size=$jobsize; Duration_minutes=$jobduration” exit 0 }
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!