What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

comparing 2 channels using Sensor Factory

Votes:

0

Your Vote:

Up

Down

HI,

How do i compare the values of two (or more) channels in the Sensor Factory and alert if they return different numbers.

Details:

I have a checksum that runs on a database table, it returns a number, this checksum runs on what should be identical copies of this database.

so i have Channel Definition

#4:NS4SUM 
channel(5087,2) 
#5:NS5SUM 
channel(5088,2)

and i want to go into error state when channel(5087,2) <> channel(5088,2)

I tried

Status Definition

#1:Comparison
(channel(5087,2) - channel(5088,2)) = 0

or

Status Definition

#1:Comparison
(channel(5087,2) <> channel(5088,2))

or

Status Definition

#1:Comparison
(channel(5087,2) != channel(5088,2))

and none of them went into error state when the channels reported differnt values. How can this be done? Also, can i compare 4 channel values and go into error state if any of the values differ from the others?

Thanks,

-chuck

channel compare prtg sensor-factory

Created on Jun 5, 2012 10:34:42 PM by  chucksalsa (0) 1

Last change on Jun 6, 2012 11:35:10 AM by  Torsten Lindner [Paessler Support]



4 Replies

Votes:

0

Your Vote:

Up

Down

Hello,

the Status-Definition field can only handle expressions with the STATUS(...)-command, not the normal channel-definition formulas.

best regards.

Created on Jun 6, 2012 11:37:41 AM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Can you provide more details beyond "what you are doing is wrong" to help me solve my problem?

Created on Jun 6, 2012 2:38:19 PM by  chucksalsa (0) 1



Votes:

0

Your Vote:

Up

Down

Okay, you cannot use the Status-Definition field for such calculations. So, why not creating a 3rd channel with

#3:Comparison
(channel(5087,2) - channel(5088,2))

and then setting Error-Limits on this channel so that everything below and above 0 sets the sensor into an Error state?

Created on Jun 6, 2012 2:47:07 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks, that was helpful.

For documentation purposes:

I wanted to make sure a (small) mysql database table was being replicated properly, so i created a MySQL sensor on each database that did a query like this:

select SUM(name + content) from records

this returns a number that is used in a Sensor Factory channel definition where i compare the two values by subtracting.

The sensor numbers are 5099 and 5096 and the channels (as listed under mysql channels tab 'Value ID') were both 2.

  1. 1:Table1vsTable4 (channel(5099,2) - channel(5096,2))

This value should always be 0, so setting the sensor factory sensor to alert when channel Table1vsTable4 was greater or less than 0 worked great.

Created on Jun 6, 2012 9:24:41 PM by  chucksalsa (0) 1



Please log in or register to enter your reply.


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.