Forum Discussion

Drew_Watson's avatar
10 years ago

Allow for comparing datapoints from multiple datasources

In our case, we want to compare a result from a query on one database to a result from a query on a different database. The queries are unable to be placed into a single datasource since separate queries are required.

I would like to see the ability to set alerts based on a comparison of datapoints from different datasources and potentially placing both lines on a shared graph.

  • Hi Drew,rnFor alerting on a comparison from e.g. two different SQL queries, it is possible to write a groovy scripted datasource that can launch multiple queries and return the various outputs. These queries could be set to use different databases and the outputs combined, compared, etc.rn rnNB. If you needed to view a comparison only (with no alerting) you could, more simply, create a custom graph widget in a dashboard and use that to bring in whichever datapoint plots, from whichever hosts, you wished, into a single graph for comparison. Obviously this would be only visible in the dashboard rather than any host.

  • Were now using Groovy scripts to combine multiple SQL Queries inside a Datasource, although its far from trivial to create a groovy script. You need to take time and learn groovy, including downloading and installing eclipse, and the Groovy plugins, and then learn the language. In fact, its extremely difficult if you are starting from scratch, and really requires a dedicated person with some development background to just get started. Frankly, its out of reach for the typical system administrator as a side project.