Forum Discussion

Antony_Hawkins's avatar
5 years ago

Missing ConfigSources PropertySource

This one came up when a customer pondered how they'd know if ConfigSources weren't finding instances on devices they should be (typically this would be due to an absence of valid credentials, for example).

This PropertySource relies on API credentials (set as properties apiaccessid.key and apiaccesskey.key) and checks devices for any ConfigSource that applies to that device, but which has zero instances.

As a PropertySource it *only* writes properties, which will look a bit like this:

Obviously this doesn't trigger any alerting as written, but you can very very easily write a datasource that simply returns the auto.missing_configsources_count value and then alert on anything non-zero.

v1.0.0: ZGEG67

Note: If you're tempted to try the same with DataSources, remember that they're nothing like as clear-cut - a resource may have all sorts of DataSources applied to it (e.g. IIS for a Windows server) that may quite correctly have zero instances discovered.