An open API service indexing awesome lists of open source software.

https://github.com/a-know/mackerel-remora

Remora, is agent for Mackerel ( mackerel.io ) to post service metrics
https://github.com/a-know/mackerel-remora

mackerel

Last synced: about 1 year ago
JSON representation

Remora, is agent for Mackerel ( mackerel.io ) to post service metrics

Awesome Lists containing this project

README

          

# mackerel-remora
Remora is agent for Mackerel ( mackerel.io ) to post service metrics

![remora](https://user-images.githubusercontent.com/1097533/55680852-4b7e2e00-595a-11e9-88c9-8624f3ff5332.png)

## features

- Post service metrics

## How to use
For example, using `docker-compose` .

```yml
remora:
image: aknow/mackerel-remora:latest
volumes:
- .:/app
environment:
MACKEREL_REMORA_CONFIG: /app/_example/sample.yml
```

`sample.yml` is a config for `mackerel-remora` . The following is an example of its contents.

```yml
apikey: xxxxx
plugin:
servicemetrics:
demo:
sample:
command: sh /app/_example/demo.sh
```

An example of the contents of `/app/_example/demo.sh` is:

```sh
#!/bin/sh

metric_name="demo.test_metric.number"
# metric number to post
metric=6
date=`date +%s`

echo "${metric_name}\t${metric}\t${date}"
```

If you execute `docker-compose up -d remora` and wait for a while, it looks like on Mackerel:

## Config file format

```yml
apibase:
apikey:
root:
plugin:
servicemetrics:
:
:
command:
user:
env:
:
```

- ``
- You can specify the domain of request destination API. It is usually unnecessary to specify.
- ``
- API key issued by the Mackerel organization to which you are posting. Requires write permission.
- ``
- Root directory of mackerel-remora. It is usually unnecessary to specify.
- ``
- Destination service name. You need to create a service on Mackerel beforehand.
- ``
- Plugin setting name for posting service metrics. It should not be used, but should not be duplicated.
- ``
- A command to perform standard output expected as a service metric plug-in.
- Remora expect standard output in the format `{metric name}\t{metric value}\t{epoch seconds}` as a result of executing this command.
- ``
- User of `command` running.
- ``
- Variable name of the environment variable to pass to the `command` .
- ``
- Value of the environment variable to pass to the `command` .