You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most Xymon tests perform a lot of the same activities such as scraping web pages, testing whether to set a new canonical test color, and sending status reports. I would like to create a Perl module to abstract all that, making the individual test programs more clear, concise, and compact, and providing ease of maintenance of common functions.
I am aware of the Xymon::Client module in CPAN and want to include methods such as send_status, but also want methods for setting the canonical test color like the following:
$myxymon->set_testcolor("yellow");
Xymon::Client::set_testcolor would check to see if the passed argument color is weighted more heavily then the current canonical test color. If so, it becomes the new canonical test color. Regardless, the current canonical test color is returned.
There would also be a Xymon::Client::get_testcolor to fetch the current canonical test color.
Whereas the CPAN Xymon::Client module can be pointed at Xymon config files and can send status updates without being called from Xymon, I prefer that a send_status method not send updates to display servers on their own. In my scripts, I check to see if $ENV{XYMON} is defined and if it is not, the message text is sent to STDOUT. This allows for easy debugging. To mimic the xymon client sending an update, use xymoncmd. I do not feel the module needs to worry about parsing Xymon config files and setting up the proper environment when xymoncmd already does this.
The text was updated successfully, but these errors were encountered:
Most Xymon tests perform a lot of the same activities such as scraping web pages, testing whether to set a new canonical test color, and sending status reports. I would like to create a Perl module to abstract all that, making the individual test programs more clear, concise, and compact, and providing ease of maintenance of common functions.
I am aware of the Xymon::Client module in CPAN and want to include methods such as send_status, but also want methods for setting the canonical test color like the following:
$myxymon->set_testcolor("yellow");
Xymon::Client::set_testcolor would check to see if the passed argument color is weighted more heavily then the current canonical test color. If so, it becomes the new canonical test color. Regardless, the current canonical test color is returned.
There would also be a Xymon::Client::get_testcolor to fetch the current canonical test color.
Whereas the CPAN Xymon::Client module can be pointed at Xymon config files and can send status updates without being called from Xymon, I prefer that a send_status method not send updates to display servers on their own. In my scripts, I check to see if $ENV{XYMON} is defined and if it is not, the message text is sent to STDOUT. This allows for easy debugging. To mimic the xymon client sending an update, use xymoncmd. I do not feel the module needs to worry about parsing Xymon config files and setting up the proper environment when xymoncmd already does this.
The text was updated successfully, but these errors were encountered: