Skip to content

Commit 08b1b59

Browse files
authored
Merge pull request #17 from gonicus/develop
Release v1.1.0
2 parents adb1d1c + 5f0ff25 commit 08b1b59

17 files changed

Lines changed: 271 additions & 146 deletions

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
name: flake8 Lint
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
jobs:
66
flake8-lint:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-22.04
88
name: Lint
99
steps:
1010
- name: Check out source repository
1111
uses: actions/checkout@v3
1212
- name: Set up Python environment
1313
uses: actions/setup-python@v4
1414
with:
15-
python-version: "3.11"
15+
python-version: "3.12.1"
1616
- name: flake8 Lint
1717
uses: py-actions/flake8@v2
1818
with:

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: test
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
jobs:
66
unit-tests:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88
name: test
99
steps:
1010
- uses: actions/checkout@v4
1111
- name: Set up Python environment
1212
uses: actions/setup-python@v4
1313
with:
14-
python-version: "3.8.10"
14+
python-version: "3.12.1"
1515

1616
- name: Install dependencies
1717
run: |

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# asterisk-prometheus-exporter Changelog
2+
## v1.1.0 - 2024-01-15
3+
### Added
4+
- Add metric `version_info` showing the version of the exporter [#12](https://github.com/gonicus/asterisk-prometheus-exporter/pull/12)
5+
- Add the `fully_booted_validation_timeout` configuration value to specify how long to wait for the `FullyBooted` event at startup [#13](https://github.com/gonicus/asterisk-prometheus-exporter/pull/13)
6+
7+
### Changed
8+
- The exporter now waits for the `FullyBooted` event sent by Asterisk. Used to prevent sending actions to early [#13](https://github.com/gonicus/asterisk-prometheus-exporter/pull/13)
9+
- Improve logging [#14](https://github.com/gonicus/asterisk-prometheus-exporter/pull/14)
10+
- Improve docker instructions in `README.md` [#10](https://github.com/gonicus/asterisk-prometheus-exporter/pull/10)
11+
- Update lint and test workflows to only run on the `pull_request` trigger [#15](https://github.com/gonicus/asterisk-prometheus-exporter/pull/15)
12+
13+
### Fixed
14+
- Fix scrape example in `README.md` [#11](https://github.com/gonicus/asterisk-prometheus-exporter/pull/11)
15+
16+
### Dependencies
17+
Dependencies have been updated with the following pull request: [#4](https://github.com/gonicus/asterisk-prometheus-exporter/pull/4)
18+
- Updated python to `3.12.1`
19+
- Updated prometheus-client to `0.19.0`
20+
- Updated asterisk-ami to `0.1.7`
21+
- Updated jsonschema to `4.20.0`
22+
- Updated Docker image to use `python:3.12.1-alpine`
23+
- Updated Flake8 to run on `ubuntu-22.04`
24+
- Updated Flake8 to use python version `3.12.1`

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8.10-alpine
1+
FROM python:3.12.1-alpine
22

33
ENV POETRY_VERSION=1.7.1
44

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
Repository that provides a dynamically configurable Prometheus exporter for Asterisk. The exporter uses the Asterisk Manager Interface (AMI) to communicate with Asterisk and YAML files to configure what data is scraped from Asterisk and what metrics are generated. This allows the exporter to be used with older Asterisk versions in different environments.
33

44
## Installation
5+
### Docker
6+
You can use the provided Docker image from GitHub Packages. \
7+
Run the Docker image and mount the configuration:
8+
```
9+
docker run -p 8080:8080 -v ./config.yml:/home/dev/asterisk-prometheus-exporter/config.yml ghcr.io/gonicus/asterisk-prometheus-exporter:latest
10+
```
11+
The configured metrics can be accessed at http://localhost:8080. \
12+
Alternatively, you can also create a Docker image using the provided Dockerfile.
13+
514
### Python Poetry
615
The exporter uses Poetry as it's dependency management. Head over to [Poetry](https://python-poetry.org/) to install the latest version for your desired platform.
716

@@ -20,18 +29,6 @@ By default, the exporter loads the configuration `config.yml` and uses port 8080
2029
A different port can be specified via the first positional argument: `poetry run python src/main.py 9090`. \
2130
A different configuration can be set using the `--config` option: `poetry run python src/main.py --config path/to/config.yml`.
2231

23-
### Docker
24-
Create a Docker image using the provided Dockerfile:
25-
```
26-
docker build --tag asterisk-prometheus-exporter .
27-
```
28-
29-
Run the Docker image and mount the configuration:
30-
```
31-
docker run -p 8080:8080 -v ./config.yml:/home/dev/asterisk-prometheus-exporter/config.yml asterisk-prometheus-exporter
32-
```
33-
The configured metrics can be accessed at http://localhost:8080.
34-
3532
## Configuration
3633
This section shows the rough structure of the configuration. See `src/config_schema.yml` for a detailed description of the configuration and what is possible.
3734

@@ -81,7 +78,7 @@ scrape:
8178
labels:
8279
- name: "queue"
8380
value: "$Queue" # Use '$' to access attributes from the filtered event
84-
until: "ContactStatusDetailComplete"
81+
until: "QueueStatusComplete"
8582
```
8683

8784
## Example configuration

config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ ami_client:
99
general:
1010
log_level: "INFO"
1111
login_validation_timeout: 10
12+
fully_booted_validation_timeout: 60
1213
response_timeout: 10
1314
ping_timeout: 20
1415

15-
1616
# Default settings
1717
default:
1818
scrape_interval: 15

0 commit comments

Comments
 (0)