commit 77988ebc5861cf9b8be778b8345d6256e658aea1 Author: Bernhard Date: Mon Sep 11 13:39:07 2017 +0200 First Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b1080f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.back +Version* diff --git a/Icon256-32.ico b/Icon256-32.ico new file mode 100644 index 0000000..f70f635 Binary files /dev/null and b/Icon256-32.ico differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/TaskSchedulerMonitoring-ignore.txt b/TaskSchedulerMonitoring-ignore.txt new file mode 100644 index 0000000..f62473a --- /dev/null +++ b/TaskSchedulerMonitoring-ignore.txt @@ -0,0 +1,3 @@ +ZabbixAgentAutoUpdater +GoogleUpdateTaskMachine +ZabbixExchange diff --git a/TaskSchedulerMonitoring_V2.au3 b/TaskSchedulerMonitoring_V2.au3 new file mode 100644 index 0000000..8c36207 --- /dev/null +++ b/TaskSchedulerMonitoring_V2.au3 @@ -0,0 +1,626 @@ +#NoTrayIcon +#Region ;**** Directives created by AutoIt3Wrapper_GUI **** +#AutoIt3Wrapper_Icon=Icon256-32.ico +#AutoIt3Wrapper_UseUpx=y +#AutoIt3Wrapper_Change2CUI=y +#AutoIt3Wrapper_Res_Description=Zabbix Monitor scheduled Tasks +#AutoIt3Wrapper_Res_Fileversion=1.0.0.49 +#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y +#AutoIt3Wrapper_Res_LegalCopyright=2015 Bernhard Linz +#AutoIt3Wrapper_Res_SaveSource=y +#AutoIt3Wrapper_Res_Language=1031 +#AutoIt3Wrapper_Res_Field=Website|http://znil.net +#AutoIt3Wrapper_Res_Field=Manual|http://znil.net/index.php?title=Zabbix:TaskSchedulerMonitoring +#AutoIt3Wrapper_Res_Field=See You|znil.net +#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** +Opt('MustDeclareVars', 1) +#Region ;************ Includes ************ +#Include +#include +#include +#EndRegion ;************ Includes ************ +; ########################################################################################################################## +; ########################################################################################################################## +; # TaskSchedulerMonitoring.exe --> Tool for Check BackupJobs in Zabbix # +; # 2013 Bernhard Linz / Bernhard@znil.de / http://znil.net # +; # # +; # Latest Version of this Program and Template in German: # +; # http://znil.net/index.php?title=Zabbix:TaskSchedulerMonitoring # +; # # +; # ________ .__ __. __ __ .__ __. _______ .___________. # +; # | / | \ | | | | | | | \ | | | ____|| | # +; # `---/ / | \| | | | | | | \| | | |__ `---| |----` # +; # / / | . ` | | | | | | . ` | | __| | | # +; # / /----.| |\ | | | | `----.__| |\ | | |____ | | # +; # /________||__| \__| |__| |_______(__)__| \__| |_______| |__| # +; # # +; ########################################################################################################################## +; ########################################################################################################################## + +Global $s_schtasksexe + +Global $s_temp1, $s_temp2 +Global $a_temp1, $a_temp2 +Global $a_DateTemp +Global $a_RuntimeTemp + +Global $a_ScheduledTasks[1][8] ; [0][0] = Anzahl der Tasks + ; [x][1] = Name des Task "original" + ; [x][2] = Name des Tasks "bereinigt" - ohne Leerzeichen/Sonderzeichen zur Anzeige in Zabbix unr zur Übergabe an dieses Programm hier + ; [x][3] = Last Result + ; [x][4] = Last Run Time + ; [x][5] = Next Run Time + ; [x][6] = Run As User + ; [x][7] = Task To Run + +Global $s_Task2IgnoreFile = @ScriptDir & "\TaskSchedulerMonitoring-ignore.txt" +Global $h_Task2IgnoreFile +Global $a_Task2Ignore[1] = [ 0 ] +Global $b_IgnoreTask = False + +Global $s_CleanTaskName +Global $s_OriginalTaskName +Global $s_QueryTaskName +Global $i_ThisTask + +Global $s_JSONOutput +Global $s_RunCommand + +Global $iStartTime +Global $iRunTime + +Global $b_Verbose + +; 10 20 30 40 50 60 70 80 +; 12345678901234567890123456789012345678901234567890123456789012345678901234567890 +Dim $s__Header = _ + "+------------------------------------------------------------------------------" & @CRLF & _ + "| TaskSchedulderMonitoring.exe - Version " & FileGetVersion(@ScriptName) & @CRLF & _ + "+------------------------------------------------------------------------------" & @CRLF & _ + "| 2015 von Bernhard Linz für http://znil.net - Kontakt: Bernhard@znil.net" & @CRLF & _ + "+------------------------------------------------------------------------------" & @CRLF & _ + @CRLF + +; 10 20 30 40 50 60 70 80 +; 12345678901234567890123456789012345678901234567890123456789012345678901234567890 +Dim $s__HilfeText = _ + "Hilfsprogramm für Zabbix als UserParameter um die Aufgabenplanung / Geplante" & @CRLF & _ + "Tasks zu überwachen" & @CRLF & _ + "---------------------------------------------------------------------------" & @CRLF & _ + @CRLF & _ + "Aufruf: " & @CRLF & _ + @CRLF & _ + @ScriptName & "