pyama86 / tos

mackerelのaction分岐のあれ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tos

Mackerel-Agentのaction指定時に、条件分岐の記述を簡潔に記述出来ます。

Usage

$ tos -h
Usage of tos:
  -c string
        CRITICAL(Short)
  -critical string
        CRITICAL
  -no string
        NotOK(Short)
  -not_ok string
        Not OK
  -o string
        OK(Short)
  -ok string
        OK
  -u string
        Unknown(Short)
  -unknown string
        Unknown
  -version
        Print version information and quit.
  -w string
        WARNING(Short)
  -warning string
        WARNING
[plugin.checks.log]
command = "check-log -f /path/to/file -p PATTERN"
# action = { command = "bash -c '[ \"$MACKEREL_STATUS\" != \"OK\" ]' && ruby /path/to/something.rb", user = "someone" }
action = { command = "/bin/tos -no 'ruby /path/to/something.rb'", user = "someone" }

Install

To install, use go get:

$ go get -d github.com/pyama86/tos

Contribution

  1. Fork (https://github.com/pyama86/tos/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

pyama86

About

mackerelのaction分岐のあれ


Languages

Language:Go 67.2%Language:Makefile 21.8%Language:Shell 10.9%