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

MySQL v2 Migration

Votes:

0

Hi,

Im looking at getting my existing sensors migrated to v2 , struggling with the first one though and its very simple.

Its a replication check to ensure slave services are running, i current just run the below query and use post processing options to verify it.

here is the query, it returns 'off' or 'on'

select variable_value from information_schema.global_status where variable_name='slave_running';

In mysql v2 , i created the sql file but i cant find options to valid date response, i get an error with everything i have tried.

How can set status based on this on/off response ?

Thanks

lookups mysql-v2 prtg sensor string

Created on Oct 6, 2016 2:31:48 PM

Last change on Oct 6, 2016 6:22:11 PM by  Luciano Lingnau [Paessler]



1 Reply

Votes:

0

Hello Anthony,
thank you for your KB-post.

Did you check out the following KB-post? It may help you with the migration:

Regarding your specific inquiry, please note that PRTG is not designed to handle strings. A sensor's channel expects values to be numerical (integer or float) and the SQL v2 sensors are no exception. Since SQL is quite flexible, you can use CASE statements to return a numerical value for "on" and "off", then assign a lookup in PRTG to translate this value to a message and status. Please check the following:

PRTG includes two standard lookups which your could use for "On/Off" so that you don't need to create additional lookups:

prtg.standardlookups.yesno.stateyesok

      <SingleInt state="Ok" value="1">Yes</SingleInt>
      <SingleInt state="Error" value="2">No</SingleInt>

prtg.standardlookups.yesno.statenook

      <SingleInt state="Ok" value="1">No</SingleInt>
      <SingleInt state="Error" value="2">Yes</SingleInt>

If you wish to further understand lookups, please review the following:


Best Regards,
Luciano Lingnau [Paessler Support]

Created on Oct 6, 2016 6:21:53 PM by  Luciano Lingnau [Paessler]

Last change on Oct 6, 2016 6:22:20 PM by  Luciano Lingnau [Paessler]




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.