Hi,
I want to monitor an application to make sure its handling a certain number of operations per minute. I worked out how to create an HTTP Push data sensor - and how to send the total from the application using HTTP.
Thats great - and seems to work really well. However now I want to turn the total number of operations into a delta - ie operations per second. I also want to put limits on that value so the sensor errors if it goes too low.
I can't see any way to do with the HTTP Push data sensor - but I'm sure there must be a way?
Is there a way to create a second sensor that refers to the value in the HTTP Push data sensor - but has delta / limits?
thanks - Zodiac
Article Comments
Hello Zodiac,
we appreciate your inquiry.
It may not be possible with the HTTP Push Data Sensor but the HTTP Push Data Advanced Sensor sensor should be able to handle it.
For instance, if your GET is the following:
http://127.0.0.1:5050/XYZ123?content=<prtg><result><channel>MyChannel</channel><value>10</value></result><text>sometext</text></prtg>
Your result looks like the following:
<result>
<channel>MyChannel</channel>
<value>10</value>
</result>
If you want it to be delta value, you'll need to "tell" PRTG that, as per the API's definition for custom sensors this can be achieved by using <Mode>Difference</Mode> tag. Your XML code should look like the following:
<result>
<channel>MyChannel</channel>
<value>10</value>
<Mode>Difference</Mode>
</result>
Please note that you can't modify the current sensor, as it channel was already defined as Absolute(default). Please deploy a new sensor after modifying your code. The complete API definition can be found within PRTG under Setup > PRTG API. Limits can also be implemented in a very similar way using the <LimitMode>, <LimitMaxError> and <LimitMaxWarning>.
Please note that when using the difference mode (delta channels) you cannot use Float values.
Best Regards,
Feb, 2016 - Permalink
Hello Zodiac,
we appreciate your inquiry.
It may not be possible with the HTTP Push Data Sensor but the HTTP Push Data Advanced Sensor sensor should be able to handle it.
For instance, if your GET is the following:
Your result looks like the following:
If you want it to be delta value, you'll need to "tell" PRTG that, as per the API's definition for custom sensors this can be achieved by using <Mode>Difference</Mode> tag. Your XML code should look like the following:
Please note that you can't modify the current sensor, as it channel was already defined as Absolute(default). Please deploy a new sensor after modifying your code. The complete API definition can be found within PRTG under Setup > PRTG API. Limits can also be implemented in a very similar way using the <LimitMode>, <LimitMaxError> and <LimitMaxWarning>.
Please note that when using the difference mode (delta channels) you cannot use Float values.
Best Regards,
Feb, 2016 - Permalink