Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Monitoring

The PBX exposes its metrics in Prometheus format, and ships reference alerts.

Plugging in Prometheus

Two ways to read /metrics:

  • From the VM, with nothing to set up: Prometheus, or a local agent that relays (Grafana Agent, node_exporter…), scrapes 127.0.0.1:8080.

    scrape_configs:
      - job_name: centrex
        static_configs:
          - targets: ["127.0.0.1:8080"]
    
  • From your Prometheus, over https, with a monitoring token: API menu of the portal, Monitoring (Prometheus) card, Create a token. The configuration to copy is shown only once, token included:

    scrape_configs:
      - job_name: centrex
        scheme: https
        authorization:
          credentials: cxs_…
        static_configs:
          - targets: ["centrex.operateur.exemple"]
    

    One token at a time: Replace the token invalidates the old one at once, Revoke makes /metrics local only again. The card shows Prometheus’s last read. Without a valid token, a request that goes through nginx is refused. Only an operator admin, signed in in person, manages this token: neither an API key nor the publisher’s support access.

Metrics

MetricMeaning
centrex_info{version, schema}Installed version and database schema.
centrex_mise_a_jour_disponible1 if a newer version is waiting in the repository.
centrex_freeswitch_joignable1 if FreeSWITCH answers.
centrex_appels_en_coursLive calls on the instance.
centrex_postes_inscritsRegistered phones and softphones.
centrex_licence_jours_restantsLicense days left; negative: expired for that many days.
centrex_licence_bloquee1 if the license expired more than 30 days ago (user creation blocked).
centrex_trunks{etat}Customer trunks by registration state (REGED, FAIL_WAIT, NOREG for an IP-authenticated trunk, INCONNU).
centrex_cdr_recusCalls kept in the log.
centrex_cdr_dernier_horodatage_secondesWhen the last call reached the log.
centrex_webhooks_en_attenteWebhook deliveries waiting.
centrex_webhooks_abandonnesDeliveries given up after all their attempts.
centrex_ip_banniesAddresses banned right now.
centrex_volume_taille_octets{volume}Volume size: enregistrements (theirs, see Recordings volume) or systeme (system disk).
centrex_volume_libre_octets{volume}Free bytes on the volume.
centrex_enregistrements_volume_dedie1 if recordings have their own volume, 0 if they share the system disk.
centrex_bascule_passives_connecteesActive/passive, on the active: passives replicating (1 in steady state).
centrex_replication_retard_secondesActive/passive, on the active: lag of the passive.

Reference alerts

/usr/share/doc/centrex-v3/supervision/alertes.yml, to load into Prometheus: PBX or FreeSWITCH unreachable, trunk not registered, no more calls in the log during the day, webhooks waiting or given up, too many banned addresses, update waiting for a week, active/passive without a passive or lagging, license about to expire or expired, sudden drop of registered phones, recordings volume at 80% then 95% or sharing the system disk, less than 10% free on the system disk. The thresholds are starting points, to adjust.

Add an alert on CPU (above 75% at peak, see Sizing) and on disk space, with your system agent.

In active/passive, the PBX is stopped on the passive: monitor both VMs, and only raise “PBX unreachable” if neither answers.

In the portal

The Diagnostics page shows the health of the instance (FreeSWITCH, database, call log, webhooks, trunks), live calls and banned addresses; email alerts (trunk down or restored, license) are set in the instance settings.