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.

Custom Property in HTTP Monitor

Is it possible to use a custom property variable within the URL field of the HTTP monitor? For instance, we use node-specific host headers for applications within a web farm to test whether there's a particular node of an application that is not responding or not returning the appropriate data. The problem is we have dozens of these applications scattered throughout multiple farms.

The idea I had was to create a custom property called "NodeNumber" and then populate that field with an integer that corresponds with the modifier needed for a particular URL. For example, if our primary application is myapp.somesite.com and that app is hosted on 5 nodes, the node specific host headers would be myapp1.somesite.com through myapp5.somesite.com. App pool sensors and site sensors are insufficient as it is possible for there to be an error with other systems that are somehow only affecting a single node. The app pool is up, the site is up, SAM is throwing no errors... but one node is actually not responding properly. I'm currently having to use Nagios to test for this, but would prefer to bring this into SAM.

What I don't want to have to do is to create individual component monitors for each and every node. I don't have an issue with each application having its own component monitor, obviously, but I'd rather not have to create hundreds of these.

That said, if I try to put http://myapp${Node.NodeNumber}.somesite.com - I get the error: Invalid URI: The hostname could not be parsed.

Is my syntax incorrect or is what I'm trying to do simply not possible within SAM? (Or, alternatively, is there a better way to accomplish my goal?)

  • larrynfp​, That is a good question. The HTTP monitor doesn't allow the use of custom properties like that. However, this could be done with a custom script monitor. Any scripting language could be used, depending on your preference. That custom property could be referenced directly in the script with ${Node.Custom.nodenumber}. It would not need to passed in as part of the script arguments.

    The harder part would be either creating or finding an already existing script that could be used/modified for this use.

  • I don't agree with the strategy that you cannot modify an application monitor once assigned to a node. Create your application template with your HTTP/HTTPS components, deploy them to your nodes and then go back and customize the URL for each one. Its the same amount of work as your custom property method except my method is using built in functionality.

    Pro Tip: Because its a farm I assume you also use a load balancer for the front end. I recommend creating a node for the load balancer VIP and assign your HTTP/HTTPS monitor with the external public facing URL to it. With this strategy you can monitor your website from all angles and you will know where the failure is.

  • Brilliant. I hadn't even considered editing the URL after the assignment. Sometimes we overlook the simplest solution... thanks!