Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
federation-monitoring
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aai
federation-monitoring
Commits
8bdb79b2
Commit
8bdb79b2
authored
7 years ago
by
Kristóf Bajnok
Browse files
Options
Downloads
Patches
Plain Diff
Fix argument parsing and zabbix_sender invocation
parent
52fc05e4
Branches
zabbix
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
share/zabbixwrapper-common.sh
+2
-4
2 additions, 4 deletions
share/zabbixwrapper-common.sh
with
2 additions
and
4 deletions
share/zabbixwrapper-common.sh
+
2
−
4
View file @
8bdb79b2
...
...
@@ -14,6 +14,7 @@
# Exaple: zabbixwrapper_check 's/^OK -- ([0-9.]+) .*/$1/;'
zabbixwrapper_parse_opts
()
{
local
OPTIND
passThru
=()
# init. pass-through array
zabbix_opt
=
""
...
...
@@ -22,17 +23,14 @@ zabbixwrapper_parse_opts () {
Z
)
zabbix_server
=
$OPTARG
zabbix_opt+
=
"-z
$OPTARG
"
shift
"
$((
OPTIND-1
))
"
;;
K
)
zabbix_key
=
$OPTARG
zabbix_opt+
=
"-k
$OPTARG
"
shift
"
$((
OPTIND-1
))
"
;;
N
)
zabbix_name
=
$OPTARG
zabbix_opt+
=
"-s
$OPTARG
"
shift
"
$((
OPTIND-1
))
"
;;
*
)
passThru+
=(
"-
$OPTARG
"
)
...
...
@@ -72,7 +70,7 @@ zabbixwrapper_evaluate () {
# This is also true if the check exits with a WARNING. You might want
# to set tresholds to avoid warning state from the plugin
echo
"-1"
zabbix
-
sender
$zabbix_opt
-o
$check_out
zabbix
_
sender
$zabbix_opt
-o
"
$check_out
"
;;
esac
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment