[OpenSIPS-Devel] [OpenSIPS/opensips] cc730f: [disaptcher] added status/report support

Bogdan Andrei IANCU noreply at github.com
Thu May 12 16:44:00 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: cc730f819faec913ae79b978ef321a48abff5004
      https://github.com/OpenSIPS/opensips/commit/cc730f819faec913ae79b978ef321a48abff5004
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2022-05-12 (Thu, 12 May 2022)

  Changed paths:
    M modules/dispatcher/README
    M modules/dispatcher/dispatch.c
    M modules/dispatcher/dispatch.h
    M modules/dispatcher/dispatcher.c
    M modules/dispatcher/doc/dispatcher_admin.xml
    M modules/dispatcher/ds_clustering.c

  Log Message:
  -----------
  [disaptcher] added status/report support

Each partition is a status/report (SR) identifier. It's status provides information DB data loading, like -2 (no data) , -1 (initial loading) , 0 (data available), 1 (reloading).
The reports will log when a reload is done and what was the outcome of the reload (success or failure). If success, a more detailed report is generated with how many destinations were loaded / discarded.
Also, each partition provides a separate identifier for reporting events about the change in state for the destinations

(opensips-cli): mi sr_list_reports dispatcher
[
    {
        "Name": "default;events",
        "Reports": [
            {
                "Timestamp": 1652373308,
                "Date": "Thu May 12 19:35:08 2022",
                "Log": "DESTINATION <sip:127.0.1.1>, set 1 switched to [inactive] due to negative probing reply\n"
            },
            {
                "Timestamp": 1652373308,
                "Date": "Thu May 12 19:35:08 2022",
                "Log": "DESTINATION <sip:127.0.1.2>, set 1 switched to [inactive] due to negative probing reply\n"
            }
        ]
    },
    {
        "Name": "default",
        "Reports": [
            {
                "Timestamp": 1652373212,
                "Date": "Thu May 12 19:33:32 2022",
                "Log": "starting DB data loading"
            },
            {
                "Timestamp": 1652373212,
                "Date": "Thu May 12 19:33:32 2022",
                "Log": "DB data loading successfully completed"
            },
            {
                "Timestamp": 1652373212,
                "Date": "Thu May 12 19:33:32 2022",
                "Log": "2 destinations loaded (0 discarded)"
            }
        ]
    }
]





More information about the Devel mailing list