SiteScope Bug - Unix hostname with dash

I have a Unix template that among other monitors, has a ping and port monitor. This template has a %%hostname%% variable and a %%ip%% variable. For the ping and port monitor, the 'Hostname to resolve' value in the template is %%ip%%. The template group name is %%hostname%%-%%ip%%. When publishing changes to this template, if the hostname has a dash in it, such as unx-svr1, the %%ip%% variable for the 'Hostname to resolve' is updated to an incorrect value that appears to first join the %%hostname%% variable with the %%ip%% variable, then split it on the first occurance of a dash.

 

For example, let's say we have a host using the template with the variable %%hostname%% set to unx-srv1 and the %%ip%% variable set to 192.168.1.10. After making any changes to the template, the 'Hostname to resolve' value in the ping and port monitors will be as follows:

-srv1-192.168.1.10

 

This causes the monitors to fail, as the value can no longer be resolved.

 

Is this a known bug? If so, is there a fix for it? If not, what would it take to get a fix in place?  I can export the template and attach if necessary.

 

I have attached multiple screenshots to show exactly what is happening.

 

remote_server_details.png - the remote server template

template.png - the template

ping_monitor_template.png - the template for ping

port_monitor_template.png - the template for port monitoring

host_with_template.png - a host that is using the template

ping_monitor_before_update.png - the ping monitor before publishing changes via 'Publish Changes'

port_monitor_before_update.png - the port monitor before publishing changes via 'Publish Changes'

ping_monitor_post_update.png - the ping monitor after publishing changes via 'Publish Changes'

port_monitor_post_update.png - the port monitor after publishing changes via 'Publish Changes'

Looks like I can only attach 5 items to a post. I'll attach the rest to a reply to my own post.

Parents Reply Children
  • So, do you think this will be addressed with a patch?

  • In testing the workaround, I changed the - to a _ and ran into the same issue.

     

    We rely on the api scripts provided for linux, so we can not have spaces in the path to any items. If there is a space, the api scripts will fail.

  • In testing the workaround, I changed the - to a _ and ran into the same issue.

     

    We rely on the api scripts provided for linux, so we can not have spaces in the path to any items. If there is a space, the api scripts will fail.

  • Did "_" produced same behavior(host to resolve = server_IP) or still you see the dash? 

     

    As workaround, you can invoke the API via direct SOAP POST with XML request that does accept spaces. You can use SoapUI to build the request, then post the XML via Linux cURL command:

     

    Create a separate script that does a SOAP XML POST to SiS API  SiS:8080/.../services (this is what these example scripts do under the covers), POST request to this URL: SiS:8080/.../APIConfigurationImpl . Check the Javadoc for public methods in SiteScope\examples\integrations\api\javadoc, the disable monitor method recieves time parameter for disabling.

     

         

    Here is a video showing how to invoke API with SoapUI: http://screencast.com/t/Ne7XPLbJ, use it to build the SOAP request.
  • Did "_" produced same behavior(host to resolve = server_IP) or still you see the dash? 

     

    As workaround, you can invoke the API via direct SOAP POST with XML request that does accept spaces. You can use SoapUI to build the request, then post the XML via Linux cURL command:

     

    Create a separate script that does a SOAP XML POST to SiS API  SiS:8080/.../services (this is what these example scripts do under the covers), POST request to this URL: SiS:8080/.../APIConfigurationImpl . Check the Javadoc for public methods in SiteScope\examples\integrations\api\javadoc, the disable monitor method recieves time parameter for disabling.

     

         

    Here is a video showing how to invoke API with SoapUI: http://screencast.com/t/Ne7XPLbJ, use it to build the SOAP request.
  • Did "_" produced same behavior(host to resolve = server_IP) or still you see the dash? 

     

    As workaround, you can invoke the API via direct SOAP POST with XML request that does accept spaces. You can use SoapUI to build the request, then post the XML via Linux cURL command:

     

    Create a separate script that does a SOAP XML POST to SiS API  SiS:8080/.../services (this is what these example scripts do under the covers), POST request to this URL: SiS:8080/.../APIConfigurationImpl . Check the Javadoc for public methods in SiteScope\examples\integrations\api\javadoc, the disable monitor method recieves time parameter for disabling.

     

         

    Here is a video showing how to invoke API with SoapUI: http://screencast.com/t/Ne7XPLbJ, use it to build the SOAP request.
  • Kenneth,

     

    Sorry for the delayed response. The "_" did produce the same behavior, as did most other characters.

     

    Since this is a new installation of SiteScope, I'm just removing all hosts/monitors and editing my templates to remove %%hostname%%-%%ip%% and changing it to just %%hostname%%

     

    Thanks for the heads up on the SOAP calls for dealing with monitors, that actually looks a bit more robust than what I'm currently using.

  • Kenneth,

     

    Sorry for the delayed response. The "_" did produce the same behavior, as did most other characters.

     

    Since this is a new installation of SiteScope, I'm just removing all hosts/monitors and editing my templates to remove %%hostname%%-%%ip%% and changing it to just %%hostname%%

     

    Thanks for the heads up on the SOAP calls for dealing with monitors, that actually looks a bit more robust than what I'm currently using.

  • Kenneth,

     

    Sorry for the delayed response. The "_" did produce the same behavior, as did most other characters.

     

    Since this is a new installation of SiteScope, I'm just removing all hosts/monitors and editing my templates to remove %%hostname%%-%%ip%% and changing it to just %%hostname%%

     

    Thanks for the heads up on the SOAP calls for dealing with monitors, that actually looks a bit more robust than what I'm currently using.