[Asterisk-code-review] res_prometheus: Add metrics for PJSIP outbound registrations (...asterisk[master])

George Joseph asteriskteam at digium.com
Tue May 21 08:57:23 CDT 2019


George Joseph has uploaded a new patch set (#4) to the change originally created by Matt Jordan. ( https://gerrit.asterisk.org/c/asterisk/+/11372 )

Change subject: res_prometheus: Add metrics for PJSIP outbound registrations
......................................................................

res_prometheus: Add metrics for PJSIP outbound registrations

When monitoring Asterisk instances, it's often useful to know when an
outbound registration fails, as this often maps to the notion of a trunk
and having a trunk fail is usually a "bad thing". As such, this patch
adds monitoring metrics that track the state of PJSIP outbound registrations.
It does this by looking for the Registry events coming across the Stasis
system topic, and publishing those as metrics to Prometheus. Note that
while this may support other outbound registration types (IAX2, SIP, etc.)
those haven't been tested. Your mileage may vary.

(And why are you still using IAX2 and SIP? It's 2019 folks. Get with the
program.)

This patch also adds Sorcery observers to handle modifications to the
underlying PJSIP outbound registration objects. This is useful when a
reload is triggered that modifies the properties of an outbound registration,
or when ARI push configuration is used and an object is updated or
deleted. Because we rely on properties of the registration object to
define the metric (label key/value pairs), we delete the relevant metric when
we notice that something has changed and wait for a new Stasis message to
arrive to re-create the metric.

ASTERISK-28403

Change-Id: If01420e38530fc20b6dd4aa15cd281d94cd2b87e
---
A res/prometheus/pjsip_outbound_registrations.c
M res/prometheus/prometheus_internal.h
M res/res_prometheus.c
3 files changed, 386 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/11372/4
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11372
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: If01420e38530fc20b6dd4aa15cd281d94cd2b87e
Gerrit-Change-Number: 11372
Gerrit-PatchSet: 4
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190521/2a15c1ea/attachment.html>


More information about the asterisk-code-review mailing list