Hi,
I cleaned up the code, see the attached patch.
Some bugs: Remove `r from message -> This corrupts the procs check
Use [text.encoding]::ascii.getbytes to encode the data stream -> On some server sometimes the original code gives 0 bytes. I never found out in the orignal datastream what was the reason. The option xymonlogarchive was used to keep the logfiles and the collected data but we never found a difference.
Allow to download a file when serverUrl is used via the bb: syntax
Other changes: Option ping to test connection to the xymon server
- Test the new version with the 'ping' option to make sure it works
Environment variable YMONCLIENTCFG can be used to point to an alternatieve xymonclient_config.xml configuration file -> We use this in combination with the 'ping' option to test a new XML configuration file with an external script
Download configuration files from xymon server to etc directory
- Add config option to the clientconfigfile to download configuration files to the etc directory
- Add function XymonManageConfigs to download configuration files to the etc directory -> We use this to distribute configuration file for external scripts to the servers. One of the scripts is used to generate a new xml configuration file.
Allow to send something via the 'usermsg' channel -> We use this to send inventory data collected by an external script to the xymon server. Of course, you need a scripts on the xymon server to process this data.
Allow multiple serverUrl that will receiving the same data, separated with space
- Same serverHttpUsername/serverHttpPassword ! -> We have used this to migrate to a new xymon server so both receive all data.
Disable server certification validation when sending data to a https server -> This was needed for a Xymon server with https with self signed certificates. Maybe do this via an option?
Add xymonlogarchive to the clientconfigfile to copy the logfiles and send data to an alternative directory - Usefull for debugging - Also some changes in XymonLogSend
Add slowscanrate option to the clientconfigfile to overrule the default slowscanrate setting of 72
Duplicate bb to xymon in the clientconfigfile
Add scan|<number> to the clientconfigfile so you can run an external script every <number> run
- Also some changes in XymonExecuteExternals
Make slowscanrate a random number during startup
Stef