wazo-amid: add /status API

Description

As a monitoring service, I want to know the status of wazo-amid in order to alert people if something goes wrong.

API specification:

GET /status { "bus_publisher": { "status": "ok" }, "service_token": { "status": "ok" }, "ami_socket": { "status": "ok" } }

 

 

We must create an HTTP API endpoint that returns the current status of the service named wazo-amid .

The AMI (Asterisk Manager Interface) sends Asterisk events to wazo-amid (TCP socket).

These events are for example: “new call”, “call hung up”, …

wazo-amid forwards these events to the Wazo system by using AMQP/RabbitMQ.

We don’t need to update the events. We only needs to create an endpoint returning the current status of the service wazo-amid.

 

The two only values for the status are “ok” and “fail”.

Zendesk Ticket IDs

None

Activity

Show:

Nabil Ben Youssef July 8, 2022 at 9:44 AM

I made a small update on one integration test, can you quickly review again plz ?

When executed on an openstack node, the integration tests take more time to be executed, so I had to change the “interval” and the “tries” params:

until.assert_(assert_status_ok, tries=5, interval=10)

Thank you

Nabil Ben Youssef June 23, 2022 at 9:11 AM

  • code completed, but needed to be cleaned now

  • integration tests :

    • tests for AMI client done,

    • tests for RabbitMQ client done

    • cleanup needed

Nabil Ben Youssef May 30, 2022 at 11:29 AM

logs for wazo-amid are stored in /var/log/wazo-amid.log

we can use journalctl -u wazo-amid too

Done

Details

Priority

Assignee

Reporter

Approvers

Pascal Cadotte

Pair

Sébastien Duthil

Fix versions

Sprint

Zendesk Support

Created May 26, 2022 at 2:34 PM
Updated July 13, 2022 at 9:12 PM
Resolved July 8, 2022 at 12:23 PM

Flag notifications