Skip to content

TritonDataCenter/triton-cmon-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

triton-cmon-plugins

These plugins are for the Triton Container Monitor system.

These are unofficial. They were previously used in Joyent's production infrastructure, and given new life in Edgecast's production infrastructure. These plugins may or may not work with your systems. A valid workaround for you might be to install to an alternate location and symlink the plug-ins you wish to use.

Installing

To install the plugins, download the latest version, copy it out to all compute nodes, and extract it to /opt/custom/cmon.

Run these commands from your headnode.

mkdir -p /opt/custom
latest=$(curl -s https://api.github.com/repos/tritondatacenter/triton-cmon-plugins/releases/latest | json assets.0.browser_download_url)
curl -o /tmp/cmon-plugins.tar.gz -L "$latest"
sdc-oneachnode -c -X -g /tmp/cmon-plugins.tar.gz -d /tmp
sdc-oneachnode -a 'mkdir -p /opt/custom ; gtar zxf /tmp/cmon-plugins.tar.gz --no-same-owner -C /opt/custom'

Using

Once the plugins are installed, they'll show up automatically by polling CMON. See the CMON documentation for an example. Note that for global-zone metrics, you need to use file_sd with a JSON file of targets.

Building

Just run make to produce a tar.

Developing

See the triton-cmon-agent documentation for developing plug-ins.

Prefer making plugins with .prom extension so that they can be checked with promtool.

Before committing, your plugin should be lint clean with whatever language you used to develop it (e.g., jsvascriptlint, shellcheck, clippy) and pass make check which lints plugin output.

Prerequisites for Development

To use make check, you'll need promtool installed in your PATH. Since go get outside of a module is deprecated, install it manually:

go install github.com/prometheus/prometheus/cmd/promtool@latest

See: https://pkg.go.dev/github.com/prometheus/prometheus/cmd/promtool

If you use external commands that may not be present or functional in a development environment, or may be dangerous to run (for whatever reason...), also create an appropriate mock tool to simulate its output for use with make check.

Releasing

Run make release and a new release will be created and pushed to GitHub. You'll need the hub command, and be a member of the Joyent organization.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •