Forum Discussion

mmatec01's avatar
mmatec01
Icon for Neophyte rankNeophyte
10 months ago
Solved

Revisiting old topic - Custom Alerts for ConfigSources

At this time I have a need for a custom ConfigSource that would compare 2 textual files and report on Any Change.  Nothing fancy and the new ConfigSource with default settings indeed works just fine IF you only want to get an alert that a change was detected.  However I would like to pass the actual lines that were modified in the alert.  In searching for this topic I found an archived post from 5 years ago.

Custom Alerts for ConfigSources

In that post Nick is asking if it is possible to do the following;

  1. Being able to put what lines were added or removed right in the alert. For simple configs you can then tell right away if you need to take action or not.

That’s exactly what I am after. The archived post was posted 5 years ago…. does anybody know if there was any progress on this feature?  I have a sinking feeling this is not possible today, or at least it’s not any easier than it was 5 years ago.  Back to custom scripting?

  • Pretty sure it can’t be done. I think the uphill battle is that you’re passing configuration text outside of LM’s RBAC control. You might have better lucking asking for the number of config lines that changed, but that’s not really helpful.

    I’d like to see this ability as well.

3 Replies

  • Pretty sure it can’t be done. I think the uphill battle is that you’re passing configuration text outside of LM’s RBAC control. You might have better lucking asking for the number of config lines that changed, but that’s not really helpful.

    I’d like to see this ability as well.

  • mmatec01 : As i understand your ask to have a trigger to generate alert, when there is a “not contain” or “must contain” scenario. LMConfig provides a very strong alert rules (config checks) and you create your own customer checks by leveraging Groovy Scripts - config check type. Please let me know if you need more details on it.

  • Mr. Ravimishra,

    that’s not what I was asking.  Please read my initial post (as well as archived post).  I want to have an alert triggered on ‘Any Change’ check type AND in addition said alert should state what lines were added or removed in the body of alert.

    I understand this is currently not possible using the ConfigSources.  For whatever reason.  So what I am doing instead - schedule a cron job, fetch the config files every 10 minutes or so from destination, crunch the numbers, comparing the previous and current version and output the desired output in the log which is then consumed  by EventSource.  One can use LM Logs as well.  So everything works but the solution has many moving parts as opposed to using just ConfigSource and be done with it.  Oh well.