From e74e3751ee420d478e64c09a5588eb3a99735620 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 24 Jun 2021 18:19:16 +0000 Subject: [PATCH] Nagios package. For now just the return codes for plugins. --- mnpw.go | 1 + pkg/nagios/nagios.go | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 pkg/nagios/nagios.go diff --git a/mnpw.go b/mnpw.go index ec7d7b9..90ee2be 100644 --- a/mnpw.go +++ b/mnpw.go @@ -1,6 +1,7 @@ package main import ( + "git.shore.co.il/shore/mnpw/pkg/nagios" "os" ) diff --git a/pkg/nagios/nagios.go b/pkg/nagios/nagios.go new file mode 100644 index 0000000..6badb56 --- /dev/null +++ b/pkg/nagios/nagios.go @@ -0,0 +1,12 @@ +package nagios + +// Although exit codes can't be a negative, int is used to match +// ExitCode in *os.ProcessState. +type ReturnCode int + +const ( + OK ReturnCode = 0 + WARNING = 1 + CRITICAL = 2 + UNKNOWN = 3 +) -- GitLab