Alert on certificate ssl less 10 days

Hello,
i have a librenms installed with docker.
works great (Thank you!)

i setup application certificate

works fine, but i try to add a sort of alert if
Certificate Remaining Days < 10

i think to use
applications_metric.value less 10

but how i can define “Certificate Remaining Days” ???
i search applications.name or similar but i can’t found nothing…

can you help me please?
thank you

Usually your best bet is to explore the applications and application_metrics tables.

TBH I’ve never seen this particular app, so this is just a guess based on the application polling code, but maybe something like…

applications.app_type = “certificate”
&&
application_metrics.metric = “remaining_days”
&&
application_metrics.value < 10

Thank yuo for reply.
i try
applications.app_type EQUAL certificate
AND
application_metrics.metric EQUAL remaining_days
AND
application_metrics.value < 40
i have some certs with 35-38 remainin days but i have no alert…

after i try
application_metrics.metric EQUAL remaining_days
AND
application_metrics.value < 40

but nothing…
do you have some ideas?

thank you in advance

If you’re able to, trying running this query to get a better look at the data…

SELECT devices.hostname, devices.sysName, applications.device_id, applications.app_id, applications.app_state, application_metrics.metric, application_metrics.value
FROM devices,applications,application_metrics 
WHERE (devices.device_id = applications.device_id)
  AND (applications.app_id = application_metrics.app_id)
  AND app_type = 'certificate'

It looks like the application_metrics.metric field is actually: [fqdn]_remaining_days

So if you change the application_metrics.metric piece of your alert to…

application_metrics.metric ends with “_remaining_days”

…I think you’ll be set.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.