Tools for handling UMS mail API responses.
Install Go 1, either from source or with a prepackaged binary.
Then run
go get github.com/nightlyone/ums
To build the nagios check
go get github.com/nightlyone/ums/cmd/check_ums
go install github.com/nightlyone/ums/cmd/check_ums
Get usage of the nagios check
$GOPATH/bin/check_ums -h
BSD
package documentation at go.pkgdoc.org
Contributions are welcome. Please open an issue or send me a pull request for a dedicated branch. Make sure the git commit hooks show it works.
enable commit hooks via
cd .git ; rm -rf hooks; ln -s ../git-hooks hooks ; cd ..
production usage, deleting all processed mails
define command{
command_name check_ums
command_line /usr/lib/nagios/plugins/check_ums -delete_after=true -host=$ARG2$ -email=$ARG1$ -password=$ARG3$
}
test usage, NOT deleting processed mails
define command{
command_name check_ums_test
command_line /usr/lib/nagios/plugins/check_ums -host=$ARG2$ -email=$ARG1$ -password=$ARG3$
}
if you have all your credentials in a special ini-style nagios config, you can also try adding a secion like this
[ums]
Email = umsbots@example.com
Password = secr3t
Host = pop3.example.com
Port = pop3s
and then use the plugin this way
define command{
command_name check_ums
command_line /usr/lib/nagios/plugins/check_ums -delete_after=true -config=$ARG1$
}