Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
api
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 .

About

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

Topics

Resources

License