Hi,
I have a new version available with additional bug fixes and enhancements.
See attached files.
Additional changes:
Return $false if XymonSendViaHttp has an error
If DecryptHttpServerPassword returns an error, returns $null and abort XymonSendViaHttp
Catch error in DownloadFile and write error to the log Also return $false
Use output from XymonSend as return value in XymonDownloadFromServer This can be $false if there is an error in XymonSend
Allow multiple clientversion download lines in configuration file
Test if the file exist when downloading a file before overwriting the old file
Stef
On 2023-12-15 13:31, Stef Coene wrote:
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
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon