Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
73ea56be
Verified
Commit
73ea56be
authored
Feb 17, 2018
by
Florian Pritz
Browse files
zabbix/mysql-userstats: Fix json of discovery script
Signed-off-by:
Florian Pritz
<
bluewind@xinu.at
>
parent
3ecd239f
Changes
1
Hide whitespace changes
Inline
Side-by-side
roles/zabbix-agent/files/mysql-user-stats.pl
View file @
73ea56be
...
...
@@ -26,9 +26,7 @@ if ($mode eq "userstat") {
print
encode_json
(
$db
->
selectrow_hashref
("
select * from information_schema.user_statistics where user = ?
",
undef
,
$user
));
}
elsif
(
$mode
eq
"
discover
")
{
print
encode_json
({
data
=>
[
$db
->
selectall_arrayref
("
select user '#USERNAME' from information_schema.user_statistics
",
{
Slice
=>
{}})
]
data
=>
$db
->
selectall_arrayref
("
select user '{#USERNAME}' from information_schema.user_statistics
",
{
Slice
=>
{}})
});
}
else
{
die
"
unhandeled mode
";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment