-
Notifications
You must be signed in to change notification settings - Fork 174
custom_query perfdata multi-row output improvements #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Fixes error ` Use of uninitialized value in string ne`
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4404,7 +4404,10 @@ sub check_custom_query { | |
## use the second column value as the perfdata name, | ||
## use the result value as the perfdata value. | ||
my $perfname; | ||
my $perfdata; | ||
my $perfdata = ''; | ||
if (! defined $db->{perf}){ | ||
$db->{perf} = ''; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initialize perfdata variables before they are compared |
||
my $grandtotal = @{$db->{slurp}}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. check the number of rows returned by the custom query There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Get the returned custom query row count |
||
for my $r (@{$db->{slurp}}) { | ||
my $result = $r->{result}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments to explain exactly how the query results are processed into performance data