Github: Add debug + clean output
This commit is contained in:
parent
eeec9c8cf5
commit
6a1eb5fbfa
|
@ -79,10 +79,9 @@ sub run {
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($@) {
|
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");
|
||||||
use Data::Dumper;
|
$self->{output}->output_add(long_msg => Data::Dumper::Dumper(), debug => 1);
|
||||||
print Dumper($jsoncontent);
|
|
||||||
|
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +90,7 @@ sub run {
|
||||||
my $stars = $webcontent->{watchers_count};
|
my $stars = $webcontent->{watchers_count};
|
||||||
|
|
||||||
$self->{output}->output_add(severity => "OK",
|
$self->{output}->output_add(severity => "OK",
|
||||||
short_msg => sprintf("%d forks\n%d watchers\n%d stars", $forks, $watchers, $stars));
|
short_msg => sprintf("%d forks - %d watchers - %d stars", $forks, $watchers, $stars));
|
||||||
|
|
||||||
$self->{output}->perfdata_add(label => 'forks',
|
$self->{output}->perfdata_add(label => 'forks',
|
||||||
value => $forks);
|
value => $forks);
|
||||||
|
|
Loading…
Reference in New Issue