Subject: | Disable pagination to see all services |
When fetching service statuses, if there's more than 100, this module won't see them, as it only scrapes the first page.
The fix is to simply add "limit=0" to the URL requested - patch attached.
Subject: | Scrape.pm.patch |
diff --git a/lib/Nagios/Scrape.pm b/lib/Nagios/Scrape.pm
index 466ccc6..d2ce1bc 100644
--- a/lib/Nagios/Scrape.pm
+++ b/lib/Nagios/Scrape.pm
@@ -115,7 +115,7 @@ sub get_service_status {
my $ua = LWP::UserAgent->new;
my $req =
HTTP::Request->new( GET => $self->{url}
- . '?host=all&noheader=yes&servicestatustypes='
+ . '?host=all&noheader=yes&limit=0&servicestatustypes='
. $self->{service_state} );
$req->authorization_basic( $self->{username}, $self->{password} );
my $response = $ua->request($req);