mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
SpotWeb uses different tables for Watchlist and Downloaded
This commit is contained in:
parent
47a45bdfa2
commit
694a5291b3
1 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# Munin plugin for number of spots in a MySQL database
|
# Munin plugin for number of spots in a MySQL database
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 - Rowdy Schwachöfer (http://rowdy.nl)
|
# Copyright (C) 2011 - Rowdy Schwach<EFBFBD>fer (http://rowdy.nl)
|
||||||
#
|
#
|
||||||
# Spotweb : http://github.com/spotweb/spotweb
|
# Spotweb : http://github.com/spotweb/spotweb
|
||||||
# Original idea : smeerbartje (http://gathering.tweakers.net/forum/myreact/190949)
|
# Original idea : smeerbartje (http://gathering.tweakers.net/forum/myreact/190949)
|
||||||
|
@ -72,13 +72,13 @@ $spots =~ /(\d+)/;
|
||||||
print "spots.value ".$1."\n";
|
print "spots.value ".$1."\n";
|
||||||
|
|
||||||
# Downloaded
|
# Downloaded
|
||||||
my $downloaded = `$MYSQL $MYSQLOPTS -e 'SELECT count(*) as comments FROM $DATABASE.downloadlist WHERE stamp > $FROMSTAMP'`;
|
my $downloaded = `$MYSQL $MYSQLOPTS -e 'SELECT count(messageid) as comments FROM $DATABASE.spotstatelist WHERE download IS NOT NULL'`;
|
||||||
$downloaded =~ /(\d+)/;
|
$downloaded =~ /(\d+)/;
|
||||||
print "downloaded.value ".$1."\n";
|
print "downloaded.value ".$1."\n";
|
||||||
|
|
||||||
# Watchlist
|
# Watchlist
|
||||||
if($SHOW_WATCHLIST eq 'yes') {
|
if($SHOW_WATCHLIST eq 'yes') {
|
||||||
my $watchlist = `$MYSQL $MYSQLOPTS -e 'SELECT count(*) as watchlist FROM $DATABASE.watchlist'`;
|
my $watchlist = `$MYSQL $MYSQLOPTS -e 'SELECT count(messageid) as watchlist FROM $DATABASE.spotstatelist WHERE watch IS NOT NULL'`;
|
||||||
$watchlist =~ /(\d+)/;
|
$watchlist =~ /(\d+)/;
|
||||||
print "watchlist.value ".$1."\n";
|
print "watchlist.value ".$1."\n";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue