Skip to content
Remora, is agent for Mackerel ( mackerel.io ) to post service metrics
Branch: master
Clone or download
Latest commit 9c443ec Apr 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_example
api Refactor Apr 5, 2019
cmd/mackerel-remora
config Fix for multiple services Apr 7, 2019
metric Fix for multiple services Apr 7, 2019
remora
spec Remove comments Apr 7, 2019
.gitignore
Dockerfile build scripts Apr 7, 2019
LICENSE
Makefile build scripts Apr 7, 2019
README.md
go.mod Reuse mackerel-container-agent package Apr 4, 2019
go.sum

README.md

mackerel-remora

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

remora

features

  • Post service metrics

How to use

For example, using docker-compose .

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.

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

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

#!/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

apibase: <apibase>
apikey: <apikey>
root: <rootdir>
plugin:
  servicemetrics:
    <servicename>:
      <settingname>:
        command: <command>
        user: <user>
        env:
          <envkey>: <envvalue>
  • <apibase>
    • You can specify the domain of request destination API. It is usually unnecessary to specify.
  • <apikey>
    • API key issued by the Mackerel organization to which you are posting. Requires write permission.
  • <root>
    • Root directory of mackerel-remora. It is usually unnecessary to specify.
  • <servicename>
    • Destination service name. You need to create a service on Mackerel beforehand.
  • <settingname>
    • Plugin setting name for posting service metrics. It should not be used, but should not be duplicated.
  • <command>
    • 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>
    • User of command running.
  • <envkey>
    • Variable name of the environment variable to pass to the command .
  • <envvalue>
    • Value of the environment variable to pass to the command .
You can’t perform that action at this time.