This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

File Change Monitor - MD5 Checksum

SAM has a MD5 checksum option under file change monitor component but to my surprise only 1 file can be added at a time per component !

I have a bunch of files under a folder that requires MD5 checksum. I am not sure why there is no option to add multiple files. I opened a support ticket with SW and their response is to create a PowerShell script.
I can't believe that SW does not have an option to select multiple files within a file change component.

Is anyone in this group aware of this issue or if I could get help in writing such script?

regards



















  • imran356  wrote:

    SAM has a MD5 checksum option under file change monitor component but to my surprise only 1 file can be added at a time per component !

    I have a bunch of files under a folder that requires MD5 checksum. I am not sure why there is no option to add multiple files. I opened a support ticket with SW and their response is to create a PowerShell script.
    I can't believe that SW does not have an option to select multiple files within a file change component.

    Is anyone in this group aware of this issue or if I could get help in writing such script?

    regards



















    Hi Imran, did you end up writing a powershell script for this workflow or did you create multiple monitors? also, do you know about how many files you're looking to monitor in a batch? If you wrote something up, please share, as I'm track an improvement request under SAM-10076

  • I am doing MD5 hashing of some files single file and with a custom script I wrote in ....vbscript emoticons_sad.png.  I'm also not doing it all in 1 component monitor.  If you're more of a vbscript guy (and I hope not emoticons_wink.png) I'm using the MD5 hashing algorithm from here: How to generate MD5 using VBScript in classic ASP? - Stack Overflow

    BUT if it helps any:  I have run into this type of issue before for other scripts I have written that need to keep track of custom data between Orion script executions to do "diffs" of the data and I believe the only way you're going to get what you want (multiple files checked with 1 component) is to have an external config file that you create somewhere on your solarwinds poller where you keep the files names and the results of the hashing of the file the "last time the script ran" so you can read this as a config file and compare the files and hashes from the current execution to the last execution.  If you use powershell if might be possible to build the config file just using "import-csv" to read it in, use this to get the files to check and compare the hashes, and "export-csv" to write it back out with the new hash values.

    Doing this gets weird if you have an HA environment (or multiple pollers) set up.  I have HA and I have a secondary script on task scheduler that, every hour, copies all my "custom config files" for all my custom scripted pollers to my secondary server so if the system fails over the scripts will have a "resaonably recent" copy of the confg data on the backup poller.

    It would be *really* helpful if SolarWinds provided a "scratch variable" or two for custom scripts to write to that would remain persistent across polling intervals.  Even if it was a single string variable at least you just put a single JSON formatted string into it to store whatever you needed.