% mackerel-plugin-uptime
uptime.seconds 1573858.000000 1458815736
http://help-ja.mackerel.io/entry/spec/api/v0
curl https://mackerel.io/api/v0/services/test/tsdb -H 'X-Api-Key: xxxxxxxx' -H 'Content-Type: application/json' -X POST -d '[{"name": "Sample.foo", "time": '$(date +%s)', "value": 30}, {"name": "Sample.bar", "time": '$(date +%s)', "value": 100}]'
mkr throw
% cat <<EOF | mkr throw --host <hostId>
<name> <value> <time>
<name> <value> <time>
EOF
% cat <<EOF | mkr throw --service My-Service
<name> <value> <time>
<name> <value> <time>
EOF
alias(
divide(
host('HostIdXXXXX', 'custom.memcached.hitmiss.get_hits'),
host('HostIdXXXXX', 'custom.memcached.cmd.cmd_get')
),
'hitrate'
)
group(
alias(
avg(
timeShift(
roleSlots('some:app','loadavg5'),
'1w'
)
),
'avg-lastweek'
),
alias(
avg(
roleSlots('some:app','loadavg5')
),
'avg'
)
)
% echo "local.random.diceroll 4 $(date +%s)" | nc localhost 2003
I acknowledge that most people are probably consuming Graphite with a nice frontend like Grafana so they'll probably never notice this change, but it bothers me so I'm going to fix it anyways.