With the epagent, there are a number of PERL scripts within the <epagent_home>/epaplugins/windows directory but here is the rub, we don't have access to PERL on windows.
Does anyone have a set or an example of .bat plugins for the epagent on Windows?
Would like examples and the IntrscopeAgent.properties file that has the settings to enable the .bat plugins.
We have one .bat file that we cobbled together to count the number of a text pattern in a file, but that was a pretty simple echo a number. I'm looking for something that will run something like "wmic pagefile list /format:list" and parse each line of the output as metrics.
-- Count the number of times ""AMQ6150: WebSphere MQ semaphore is busy." is present within the AMQERR01.LOG file.
-- Report 3 if there is an increase, 2 if it is less and 1 if equal, based on the previous time the script ran versus current run as to try not to count the same instances again.
findstr /c:"AMQ6150: WebSphere MQ semaphore is busy." "e:\IBM\WebSphere MQ\errors\AMQERR01.LOG"| find /c /v "" > ./tmpfile.txtset /p error_count_new=<tmpfile.txtdel tmpfile.txttype e:\epagent\logscan_count.txt > ./tmpfile2.txtset /p error_count_old=<tmpfile2.txtdel tmpfile2.txtIF %error_count_new% GTR %error_count_old% SET COUNT=3IF %error_count_new% EQU %error_count_old% SET COUNT=1IF %error_count_new% LSS %error_count_old% SET COUNT=2ECHO LOGSCAN:LOG_COUNT=%COUNT%ECHO %error_count_new% > e:/epagent/logscan_count.txt
Can Billy's fellow Admins, CA Partners, and CA staff provide examples of sample scripts?