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

How to assign multiple values from a MYSQL query to different channels on the same sensor?

Votes:

0

We are trying to get multiple values from a MYSQL query and we would like to assign these multiple values to multiple channels on the same sensor. The way we have it working for now is that we run multiple queries and we assign each query result to a different sensor. That is putting extra load on our DB and it is not a scalable solution. Here is an example:

Select v1,v2,v3,v4,v5 from my_table;

It would be nice if we can run this inside one MYSQL sensor and assign these values to different channels in the sensor.

We have to go around and do the following:

Select v1 from my_table;

Assign the value to sensor 1

Select v2 from my_table;

Assign the value to sensor 2.

... and so on.

I hope my explanation is covering what we are trying to accomplish. Thank you.

multichannel mysql prtg

Created on Oct 28, 2010 7:31:19 PM



8 Replies

Votes:

0

Dear James,

I'm afraid this is not possible with PRTG in the moment, and also not planned for near future releases. You can of course continue to use multiple SQL-Sensors and then combine the results with the Sensor Factory.

Best Regards.

Created on Oct 29, 2010 12:59:32 PM by  Torsten Lindner [Paessler Support]



Votes:

0

You can now do this using the EXEXML sensor. You'll need to return the results as XML for PRTG to read in. Take a look at the Custom Sensors section of the API documentation for more information. I'm using it, and it works well to address this need.

Good luck!

Created on Nov 4, 2010 8:40:09 PM

Last change on Aug 10, 2018 10:13:04 AM by  Brandy Greger [Paessler Support]



Votes:

1

First of all, thank you all for your thoughts, we appreciate such kind of feedback of course!
Let me please give you just a little insight. When PRTG 7 was released a sensor had to have a fixed number of channels when it was created, and it had to keep this number, otherwise the PRTG Core Server might have stumbled into critical problems. This stayed this way a long time with version 7. And as we don't have any information or even control about scripts used as sensors by our customers (scripts might change, might be improved, ec.), we limited the Custom sensors to have 1 Channel and fixed it to be that way.
Then we enabled a sort-of "dynamic creation" of channels in the probe for some our our "own" default sensors. This mechanism hasn't been applied yet for the script sensors, but we do consider it. It's just that of course we still want to have a stable PRTG if we enable/open this, and therefore this has to be really thoroughly thought through and also tested. Please bear with us.

Best Regards.

Created on Nov 5, 2010 2:27:45 PM by  Torsten Lindner [Paessler Support]

Last change on Nov 5, 2010 2:28:05 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Just passing to reinforce the need of multiple channels on the same sensor. Furthermore, it would be great to have a mix of snmp and "factory channels" on the same sensor. Please start thinking about it.

Regards

Created on Dec 10, 2010 3:57:37 PM



Votes:

0

Just so that you can see, that we are on this topic. For Exe/Script-Sensors multiple channels are already in "BETA"-Status (it might actually be already available in your PRTG, check under "Custom Sensors"->"EXE/Script Advanced".), it's documented under "Setup"->"PRTG API"->"Custom Sensors". For the other sensor types, please bear with us.

Created on Dec 13, 2010 11:51:01 AM by  Torsten Lindner [Paessler Support]



Votes:

0

did the ability to create multple channels ever flow down to the mysql sensor?

Created on Jul 10, 2013 1:33:48 PM



Votes:

0

Sorry, the SQL-Sensors are still limited to one Query and so then one channel for this. We recommend then to work with several SQL-Sensors and combine their results in a Sensor Factory Sensor.

Created on Jul 10, 2013 2:04:52 PM by  Torsten Lindner [Paessler Support]

Last change on Jul 10, 2013 2:05:28 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Use "JOIN-ed" select like this:

select A.VARIABLE_VALUE as 'Open_files', 
       B.VARIABLE_VALUE as 'Opened_files' 

from information_schema.GLOBAL_STATUS as a 
join (
select VARIABLE_VALUE from information_schema.GLOBAL_STATUS 
         where VARIABLE_NAME = 'Opened_files') as B 
			
where A.VARIABLE_NAME = 'Open_files';

Created on Apr 25, 2016 12:52:18 PM

Last change on Apr 25, 2016 12:55:42 PM by  Stephan Linke [Paessler Support]




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.