Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grid5000
reference-repository
Commits
d55912b3
Commit
d55912b3
authored
Mar 30, 2020
by
Simon Delamare
Browse files
[lib] kwollect : use new snmp_name field for network metric
parent
1e9353f2
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/refrepo/gen/puppet/templates/kwollect-network.erb
View file @
d55912b3
...
...
@@ -10,9 +10,8 @@ neteq.fetch('metrics', []).each {|metric|
neteq
[
'linecards'
].
each_with_index
{
|
linecard
,
linecard_uid
|
linecard
.
fetch
(
'ports'
,
[]).
each_with_index
{
|
lport
,
lport_uid
|
next
if
lport
.
empty?
lport_uid
+=
12
port_uid
=
neteq
[
'linecards'
].
length
>
1
?
"
#{
linecard_uid
}
_
#{
lport_uid
}
"
:
lport_uid
port_name
=
l
inecard
[
"snmp_pattern"
].
sub
(
"%LINECARD%"
,
linecard_uid
.
to_s
).
sub
(
"%PORT%"
,
lport_uid
.
to_s
)
port_name
=
l
port
[
'snmp_name'
]
# TODO: Handle secondary interface
port_node
=
lport
[
'uid'
]
-%>
...
...
Write
Preview
Markdown
is supported
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