projects
/
git-tools-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
90e817a
)
Get hosts from both nagios servers, show stats for all
author
Heikki Levanto
<heikki@indexdata.dk>
Wed, 2 Jan 2013 12:17:40 +0000
(13:17 +0100)
committer
Heikki Levanto
<heikki@indexdata.dk>
Wed, 2 Jan 2013 12:17:40 +0000
(13:17 +0100)
aptcheck/aptcheck.pl
patch
|
blob
|
history
diff --git
a/aptcheck/aptcheck.pl
b/aptcheck/aptcheck.pl
index
2dac01a
..
3d70053
100755
(executable)
--- a/
aptcheck/aptcheck.pl
+++ b/
aptcheck/aptcheck.pl
@@
-21,6
+21,7
@@
# 15-Aug-2011 Heikki: Adding a total in the headline, for nagiosgrapher
# 21-May-2012 Heikki: Added a date since when a package has been pending
# 31-May-2012 Heikki: Pointing to the new wiki
# 15-Aug-2011 Heikki: Adding a total in the headline, for nagiosgrapher
# 21-May-2012 Heikki: Added a date since when a package has been pending
# 31-May-2012 Heikki: Pointing to the new wiki
+# 01-Jan-2013 Heikki: Get hosts from nagios-us as well.
#
# TODO: Assumes that we release our restricted packages for all versions
# and architectures at the same time. Gets only the highest version from
#
# TODO: Assumes that we release our restricted packages for all versions
# and architectures at the same time. Gets only the highest version from
@@
-52,10
+53,15
@@
my %hostcomments = (
# I could use a hard-coded list, but I would forget to maintain it.
# Nagios knows most of our hosts. It even knows which are worth
# checking, they have a command to check apts!
# I could use a hard-coded list, but I would forget to maintain it.
# Nagios knows most of our hosts. It even knows which are worth
# checking, they have a command to check apts!
+print "Getting hostlist from nagios\n" if $debug;
+my $hostlist1 = `ssh nagios grep -l Apt /etc/nagios3/indexdata-conf.d/*.cfg`
+ or die "Could not get host list from nagios (dk)";
-my $hostlist = `ssh nagios grep -l Apt /etc/nagios3/indexdata-conf.d/*.cfg`
- or die "Could not get host list";
+print "Getting hostlist from nagios-us\n" if $debug;
+my $hostlist2 = `ssh nagios-us grep -l Apt /etc/nagios3/indexdata-conf.d/*.cfg`
+ or die "Could not get host list from nagios (dk)";
+my $hostlist = $hostlist1 . $hostlist2;
print "Got list:\n$hostlist\n" if $debug>2;
###### Get list of packages that can be manually maintained
print "Got list:\n$hostlist\n" if $debug>2;
###### Get list of packages that can be manually maintained