https://github.com/jop-software/imap-mailbox-exporter
IMAP Mailbox exporter for prometheus
https://github.com/jop-software/imap-mailbox-exporter
email email-monitoring exporter hacktoberfest imap imap-monitoring monitoring prometheus-exporter
Last synced: about 2 months ago
JSON representation
IMAP Mailbox exporter for prometheus
- Host: GitHub
- URL: https://github.com/jop-software/imap-mailbox-exporter
- Owner: jop-software
- License: mit
- Created: 2022-08-02T17:36:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-03T07:05:19.000Z (over 1 year ago)
- Last Synced: 2025-02-15T04:43:47.198Z (4 months ago)
- Topics: email, email-monitoring, exporter, hacktoberfest, imap, imap-monitoring, monitoring, prometheus-exporter
- Language: Go
- Homepage:
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Imap Mailbox Exporter
> Export the amount of mails in a mailbox for use in prometheus.
## Usage
### Probe
```txt
http://127.0.0.1:9101/probe?target=INBOX&hostname=imap.example.com&[email protected]
```### Provided metrics
```txt
# HELP probe_mailbox_count Displays the count of mails found in the mailbox
# TYPE probe_mailbox_count gauge
probe_mailbox_count 0
```### Configuration
The `imap-mailbox-exporter` can be configures with a `config.yaml` file and environment variables.
```yaml
server:
- hostname: 'imap.example.com'
port: '993'
accounts:
- username: '[email protected]'
password: 'env:E_AT_MAIL_COM_PASSWORD'
```You can use environment variables with the `env:VARIABLE_NAME` directive in YAML.
The configuration file is expected in `./config.yaml` relative to the `imap-mailbox-exporter` binary.
### Example Usage
You can find a example docker compose configuration.
Make sure to update `examples/imap-exporter.env` with your imap credentials.
**Start the example container**
```shell
pushd examplesdocker compose pull
docker compose up -d
```## Compilation
You can compile the source-code with the `go build` command.
```bash
go build -o imap-mailbox-exporter main.go
```Alternativly you can use [`gnu make`](https://www.gnu.org/software/make/) with the `make build` command to execute the `go build` command.
## License
This project is licensed under the [MIT License](./LICENCE)
© 2022, jop-software Inh. Johannes Przymusinski