mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-28 08:04:36 +02:00
+ minor fix on github stats
This commit is contained in:
parent
9cc179930c
commit
01cc973cdf
@ -26,6 +26,7 @@ use strict;
|
||||
use warnings;
|
||||
use centreon::plugins::http;
|
||||
use JSON;
|
||||
use Data::Dumper;
|
||||
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
@ -79,8 +80,7 @@ sub run {
|
||||
};
|
||||
|
||||
if ($@) {
|
||||
use Data::Dumper;
|
||||
$self->{output}->add_option_msg(short_msg => "Cannot decode json response");
|
||||
$self->{output}->add_option_msg(short_msg => "Cannot decode json response: $@");
|
||||
$self->{output}->output_add(long_msg => Data::Dumper::Dumper(), debug => 1);
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
@ -93,11 +93,14 @@ sub run {
|
||||
short_msg => sprintf("%d forks - %d watchers - %d stars", $forks, $watchers, $stars));
|
||||
|
||||
$self->{output}->perfdata_add(label => 'forks',
|
||||
value => $forks);
|
||||
value => $forks,
|
||||
min => 0);
|
||||
$self->{output}->perfdata_add(label => 'watchers',
|
||||
value => $watchers);
|
||||
value => $watchers,
|
||||
min => 0);
|
||||
$self->{output}->perfdata_add(label => 'stars',
|
||||
value => $stars);
|
||||
value => $stars,
|
||||
min => 0);
|
||||
|
||||
$self->{output}->display();
|
||||
$self->{output}->exit();
|
||||
@ -143,6 +146,8 @@ Specify password
|
||||
|
||||
=item B<--timeout>
|
||||
|
||||
Threshold for HTTP timeout (Default: 5)
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
Loading…
x
Reference in New Issue
Block a user