0.01
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
A tool for translating Sensu 1.x config to the Sensu 2.x format.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0
~> 3.0

Runtime

>= 2.1.1
>= 10.13.1
 Project Readme

Build Status Gem Version MIT Licensed Join the chat at https://slack.sensu.io/

Sensu Translator

A CLI tool for translating Sensu 1.x configuration into the Sensu 2.x format.

Installation

gem install sensu-translator

Usage

Usage: sensu-translator [options]
    -h, --help                       Display this message
    -V, --version                    Display version
    -c, --config FILE                Sensu 1.x JSON config FILE. Default: /etc/sensu/config.json (if exists)
    -d, --config_dir DIR[,DIR]       DIR or comma-delimited DIR list for Sensu 1.x JSON config files. Default: /etc/sensu/conf.d (if exists)
    -o, --output_dir DIR             Sensu Go config output DIR. Default: /tmp/sensu_go
    -n, --namespace NAMESPACE        Sensu Go Namespace. Default: default

Example

  1. Translate Sensu 1.x configuration into the Sensu 2.x format
$ sensu-translator -c /etc/sensu/config.json -d /etc/sensu/conf.d -o /tmp/sensu_go

$ tree /tmp/sensu_go

/tmp/sensu_go
├── checks
│   ├── website-healthz.json
│   └── haproxy-backends.json
├── extensions
├── filters
├── handlers
│   ├── email.json
│   └── default.json
└── mutators
    ├── obfuscate.json
    └── tag.json
  1. Use a configured sensuctl and the newly created 2.x configuration files to manage Sensu 2.x resources
sensuctl create -f /tmp/sensu_go/checks/website-healthz.json

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/sensu/sensu-translator.

License

The gem is available as open source under the terms of the MIT License.