This repository has been archived by the owner on Nov 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move ncd to root dir, remove separate send_check dir
- Loading branch information
Showing
18 changed files
with
95 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,14 @@ | ||
# A sample top level Makefile for multi package Go projects. | ||
|
||
include $(GOROOT)/src/Make.inc | ||
|
||
CMDS=\ | ||
send_check\ | ||
ncd | ||
|
||
all: make | ||
|
||
make: $(addsuffix .make, $(CMDS)) | ||
clean: $(addsuffix .clean, $(CMDS)) | ||
|
||
%.install: | ||
$(MAKE) -C $* install | ||
|
||
# compile all packages before any command | ||
%.make: | ||
$(MAKE) -C $* | ||
|
||
# establish dependancies between packages | ||
#package-2.install: package-1.install | ||
#package-1.install package-2.install: package-3.install | ||
TARG=ncd | ||
|
||
%.clean: | ||
$(MAKE) -C $* clean | ||
GOFILES=\ | ||
ncd.go\ | ||
checkresult.pb.go\ | ||
spoolfile.go\ | ||
templates.go\ | ||
send_check.go\ | ||
nagios.go | ||
|
||
%.nuke: | ||
$(MAKE) -C $* nuke | ||
include $(GOROOT)/src/Make.cmd | ||
include $(GOROOT)/src/pkg/goprotobuf.googlecode.com/hg/Make.protobuf |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
require 'json/ext' | ||
require 'json/add/core' | ||
|
||
class CheckResultSet | ||
attr_accessor :results | ||
|
||
@results = [] | ||
|
||
def to_json(*a) | ||
{'json_class' => self.class.name, | ||
'results' => results | ||
}.to_json(*a) | ||
end | ||
|
||
end | ||
|
||
class CheckResult | ||
attr_accessor :hostname, :servicename, :status, :checkpassive, :checkscheduled, :checkoutput, :start_timestamp, :end_timestamp | ||
|
||
|
||
def initialize | ||
@hostname = "ahost" | ||
end | ||
|
||
end | ||
|
||
f = CheckResultSet.new | ||
f.results = [CheckResult.new] | ||
|
||
puts f | ||
puts f.to_json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ Packager: peter woodman <[email protected]> | |
Source0: ncd | ||
Source1: ncd.init | ||
Source2: ncd.options | ||
Source3: send_check | ||
|
||
BuildRoot: %{_tmppath}/%{name}-%{version}-root | ||
|
||
|
@@ -35,8 +34,7 @@ pair of utilities to inject checks into nagios' checkresult spool | |
%install | ||
rm -rf $RPM_BUILD_ROOT | ||
mkdir -p $RPM_BUILD_ROOT | ||
install -D -m 755 %{_sourcedir}/ncd %{buildroot}/usr/sbin/ncd | ||
install -D -m 755 %{_sourcedir}/send_check %{buildroot}/usr/bin/send_check | ||
install -D -m 755 %{_sourcedir}/ncd %{buildroot}/usr/bin/ncd | ||
install -D -m 755 %{_sourcedir}/ncd.init %{buildroot}/etc/init.d/ncd | ||
install -D -m 644 %{_sourcedir}/ncd.options %{buildroot}/etc/sysconfig/ncd | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICKTCCAZICCQCHSyaol5klUTANBgkqhkiG9w0BAQUFADBZMQswCQYDVQQGEwJB | ||
VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0 | ||
cyBQdHkgTHRkMRIwEAYDVQQDEwkxMjcuMC4wLjEwHhcNMTEwNzA5MDE1ODA5WhcN | ||
MTIwNzA4MDE1ODA5WjBZMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0 | ||
ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRIwEAYDVQQDEwkx | ||
MjcuMC4wLjEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMxc61wc+VaHfHUQ | ||
Aash/Y+x57CIncGfRO2X+BNbS0I+zd7iTjbsYNzr6zQzz27IF3nTzWQq93P1sAcp | ||
1bfFmJLeGkVQT19/8pKt34ViowA36jwq+dRBk166CazaI3jmNBS5SNcFVqXu6xnk | ||
BPlVrtzAmRrhHuQ3pDhsnxcLZJGvAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAwTQj | ||
mhwhgB3cIywPQb5sjOJjHu/sZtajbtry47rdoFN0pmujLxz1srYtciORuGjlD4Iu | ||
ss/K6lgVyG4uVsJ/OUgpvZSoFBSKCnD92MQVrH0NOHfMPbFjqAc2XAtyhwu2ttpW | ||
3M06BF2+0K0bAYmCytVkQP0d/pmhwweNNTonxDY= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIICXgIBAAKBgQDMXOtcHPlWh3x1EAGrIf2PseewiJ3Bn0Ttl/gTW0tCPs3e4k42 | ||
7GDc6+s0M89uyBd5081kKvdz9bAHKdW3xZiS3hpFUE9ff/KSrd+FYqMAN+o8KvnU | ||
QZNeugms2iN45jQUuUjXBVal7usZ5AT5Va7cwJka4R7kN6Q4bJ8XC2SRrwIDAQAB | ||
AoGBALrk832/JawjpgdsxwnZwQlL+wZwOk3buW7MP1x8blw8EYyXTE5gaMlBnE2W | ||
YEsBBK8uqzTDMqDC/OPgN4qkU73CSENZCfSIxfqzhjDppVKcmuOTpnmALNouNZ0q | ||
7cuPddNSCIU/fwC3xTHkbHipHdsfUlKnUHf4JenmOT25sbeJAkEA7ybsIhApRvEm | ||
bjenSsDbQwxtd77zTBS2VfLgh5W0rjiTp/nyzc7id+1nMKHTM91HtE8/ScLaYwsd | ||
Ceuz+VfU6wJBANrClI8Ta4iq0gF8zXCyBMKCkDIrGZXCv806UzzN9BGjK6RwFjZb | ||
4jTOxDo8GbVraW7dIdEwJB81pCJ8SZr21U0CQQDHHhshSV90x7f9sKzDWsu0iZZj | ||
S0N7JwuhiDVV7lmfbU/TXhLBNO3ueGWgYjxdRHI9OHYzTd9S85/b8LnKc0y9AkBH | ||
hcSyfqPy2/6rU9WLWfiqa6ufa24DA9hXzhD22VNKDPIw4iCxBxuPLmcDrzCsmwCu | ||
qYfr7/Rva8dNKxuZmcglAkEAn9iLNb/l8+virowEGrhvXBzBUS7xnxxmJCuZgW+N | ||
Whyxn9xmXnujmJiOi9ctvxTd3SuWw52fYhqqqZoulE1Dew== | ||
-----END RSA PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
{ | ||
"Results": | ||
[ | ||
{ | ||
"Hostname":"testhost.foo.bar", | ||
"ServiceName":"test-service", | ||
"Status":0, | ||
"CheckPassive":null, | ||
"CheckScheduled":null, | ||
"CheckOutput":null, | ||
"StartTimestamp":151892832, | ||
"EndTimestamp":151895000, | ||
"Perfdata": | ||
[{"Name":"frob","Data":"100"} | ||
] | ||
} | ||
] | ||
} | ||
|