Verified Commit 73ea56be authored by Florian Pritz's avatar Florian Pritz
Browse files

zabbix/mysql-userstats: Fix json of discovery script


Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent 3ecd239f
......@@ -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";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment