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
Article Comments
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]
Oct, 2016 - Permalink
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
prtg.standardlookups.yesno.statenook
If you wish to further understand lookups, please review the following:
Best Regards,
Luciano Lingnau [Paessler Support]
Oct, 2016 - Permalink