What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Custom XML sensor does not give error

Votes:

0

Hi,

I have created a custom sensor that retreives some values via powershell and hand them to PRTG afterwards. The sensor appeared to work just fine until this morning when it had to give an error, which it did not. The value my script returned i way above the error level, but my sensor does not go down. It does not even give me a warning. The added XML is the XML node that is supposed to give me a down status.

    <result>
        <channel>_BIProcessorQueue</channel>
        <unit>Custom</unit>
        <CustomUnit>#</CustomUnit>
        <mode>Absolute</mode>
        <showChart>1</showChart>
        <showTable>1</showTable>
        <float>0</float>
        <value>44664</value>
        <LimitMaxError>499</LimitMaxError>
        <LimitMaxWarning>200</LimitMaxWarning>
        <LimitWarningMsg>This queue has over 200 messages.</LimitWarningMsg>
        <LimitErrorMsg>This queue has over 500 messages.</LimitErrorMsg>
    </result>

custom-sensor exe-xml xml

Created on Nov 27, 2018 1:12:09 PM

Last change on Nov 27, 2018 4:13:46 PM by  Birk Guttmann [Paessler Support]



1 Reply

Accepted Answer

Votes:

2

From what I see your XML seems to be okay - but I admit I had to add <PRTG> tags and remove quite some spaces from what you posted.. but I don't think that necessarily is the issue.

<PRTG>
	<result>
		<channel>_BIProcessorQueue</channel>
		<unit>Custom</unit>
		<CustomUnit>#</CustomUnit>
		<mode>Absolute</mode>
		<showChart>1</showChart>
		<showTable>1</showTable>
		<float>0</float>
		<value>44664</value>
		<LimitMaxError>499</LimitMaxError>
		<LimitMaxWarning>200</LimitMaxWarning>
		<LimitWarningMsg>This queue has over 200 messages.</LimitWarningMsg>
		<LimitErrorMsg>This queue has over 500 messages.</LimitErrorMsg>
	</result>
</PRTG>

What I am missing is this tag:

<LimitMode>1</LimitMode>

You did a great job mentioning all those settings in the output - but this one is missing - and cause it is 0 by default, your limits aren't active and therefor the sensor will not raise an error.

Details can be found here: https://www.paessler.com/manuals/prtg/custom_sensors

Test it out while forcing the script to return higher counts and you will see once you set the LIMITMODE it fill cause alerts in PRTG.

If it doesn't help, please reply!

Regards

Florian Rossmark

www.it-admins.com

Created on Nov 27, 2018 2:52:53 PM




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.