Alert for datasource instance datapoints based on Instance Description. Currently we cannot create an alert for datasource instance based on Instance description.


Sanket
 Share

Recommended Posts

As a kinda messy workaround, you can clone the DataSource you want to use so you have two version:

  1. 1. Informational version covering all instances with no alert thresholds which you can use for graphs and performance data.
  2. 2. Alerting version that uses Auto Discovery filtering to ONLY contains instances based on the naming you want to alert on and has global threshold values.

This does mean that you are performing some checks multiple times but would be more automatic than manually setting thresholds per interface. Still like the idea of having an instance option in Alert Rules though.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • Administrators

To be clear, you're looking to alert if the instance description contains a certain string? If this is the case, theoretically you can make a complex datapoint to evaluate the system.instanceDescription to see if it contains your desired search string. I thought this could be done using pure infix, but it looks like you'd need to make a groovy based complex datapoint to work on the output directly.

Or you're looking to alert if instances with a certain description have a numeric value in a given datapoint over a certain threshold?  If this is the case, @Mike Moniz's suggestion is likely the easiest: clone the DS so that you have one DS monitoring the instances of interest and one monitoring everything else. The DS monitoring the instances of interest would be configured with thresholds that apply to the instances of interest, instead of the thresholds that were cloned.

Link to comment
Share on other sites

Thanks for replying to this topic. I just like to mention that the instance description is custom updated post its discovery and i need create an alert based on that description. Now i use a different data source then the discovered instances will default description which is null in my case. Because of this i believe i will not be able to use this solution. Please clarify. I think using groovy to create a complex datapoint should work.. but i need to learn how to do that. 

Link to comment
Share on other sites

  • Administrators

Ok, if you are manually updating the description after discovery, then you'd have to replicate the work of updating the description in both datasources. However, since the same number of instances would be split over the two datasources, there wouldn't be any additional work. You'd just be doing it in a different place. Can I ask why you are updating the description after discovery and not doing it as part of discovery? I'm beginning to think the solution to your problem may be rooted in a fixation on the instance discovery. You may be able to accomplish your goal, whatever that might be, by manually (or preferably automatically) tagging the instances in a different way.

That said, take a look at this documentation: https://www.logicmonitor.com/support/logicmodules/datasources/datapoints/complex-datapoints#:~:text=Returns NaN-,Groovy Complex Datapoints,-Groovy complex datapoints

This bit may be particularly interesting: https://www.logicmonitor.com/support/logicmodules/datasources/datapoints/complex-datapoints#:~:text=instanceProps.get("auto.PropertyName")

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share