Merge "Change in OVN monitoring"

This commit is contained in:
Zuul 2021-09-29 11:17:28 +00:00 committed by Gerrit Code Review
commit 4ac2b0f3e5
2 changed files with 18 additions and 16 deletions

View File

@ -17,17 +17,19 @@
values: true
nullPointMode: 'null'
targets:
- target: alias($Cloud.$Node.ovn-ACL.gauge-ovn_ACL, 'ovn_ACL')
- target: alias($Cloud.$Node.ovn-Address_Set.gauge-ovn_Address_Set, 'ovn_Address_Set')
- target: alias($Cloud.$Node.ovn-Datapath_Binding.gauge-ovn_Datapath_Binding, 'ovn_Datapath_Binding')
- target: alias($Cloud.$Node.ovn-Load_Balancer.gauge-ovn_Load_Balancer, 'ovn_Load_Balancer')
- target: alias($Cloud.$Node.ovn-Logical_Flow.gauge-ovn_Logical_Flow, 'ovn_Logical_Flow')
- target: alias($Cloud.$Node.ovn-Logical_Router.gauge-ovn_Logical_Router, 'ovn_Logical_Router')
- target: alias($Cloud.$Node.ovn-Logical_Router_Port.gauge-ovn_Logical_Router_Port, 'ovn_Logical_Router_Port')
- target: alias($Cloud.$Node.ovn-Logical_Router_Static_Route.gauge-ovn_Logical_Router_Static_Route, 'ovn_Logical_Router_Static_Route')
- target: alias($Cloud.$Node.ovn-Logical_Switch.gauge-ovn_Logical_Switch, 'ovn_Logical_Switch')
- target: alias($Cloud.$Node.ovn-Logical_Switch_Port.gauge-ovn_Logical_Switch_Port, 'ovn_Logical_Switch_Port')
- target: alias($Cloud.$Node.ovn-MAC_Binding.gauge-ovn_MAC_Binding, 'ovn_MAC_Binding')
- target: alias($Cloud.$Node.ovn-Multicast_Group.gauge-ovn_Multicast_Group, 'ovn_Multicast_Group')
- target: alias($Cloud.$Node.ovn-Port_Binding.gauge-ovn_Port_Binding, 'ovn_Port_Binding')
- target: alias($Cloud.$Node.ovn-Port_Group.gauge-ovn_Port_Group, 'ovn_Port_Group')
- target: alias($Cloud.$Node.ovn-sbdb-Address_Set.gauge-ovn_sbdb_Address_Set, 'ovn_sbdb_Address_Set')
- target: alias($Cloud.$Node.ovn-sbdb-MAC_Binding.gauge-ovn_sbdb_MAC_Binding, 'ovn_sbdb_MAC_Binding')
- target: alias($Cloud.$Node.ovn-sbdb-Multicast_Group.gauge-ovn_sbdb_Multicast_Group, 'ovn_sbdb_Multicast_Group')
- target: alias($Cloud.$Node.ovn-sbdb-Port_Binding.gauge-ovn_sbdb_Port_Binding, 'ovn_sbdb_Port_Binding')
- target: alias($Cloud.$Node.ovn-sbdb-Port_Group.gauge-ovn_sbdb_Port_Group, 'ovn_sbdb_Port_Group')
- target: alias($Cloud.$Node.ovn-sbdb-Datapath_Binding.gauge-ovn_sbdb_Datapath_Binding, 'ovn_sbdb_Datapath_Binding')
- target: alias($Cloud.$Node.ovn-sbdb-Logical_Flow.gauge-ovn_sbdb_Logical_Flow, 'ovn_sbdb_Logical_Flow')
- target: alias($Cloud.$Node.ovn-nbdb-Load_Balancer.gauge-ovn_nbdb_Load_Balancer, 'ovn_nbdb_Load_Balancer')
- target: alias($Cloud.$Node.ovn-nbdb-ACL.gauge-ovn_nbdb_ACL, 'ovn_nbdb_ACL')
- target: alias($Cloud.$Node.ovn-nbdb-Address_Set.gauge-ovn_nbdb_Address_Set, 'ovn_nbdb_Address_Set')
- target: alias($Cloud.$Node.ovn-nbdb-Logical_Router.gauge-ovn_nbdb_Logical_Router, 'ovn_nbdb_Logical_Router')
- target: alias($Cloud.$Node.ovn-nbdb-Logical_Router_Port.gauge-ovn_nbdb_Logical_Router_Port, 'ovn_nbdb_Logical_Router_Port')
- target: alias($Cloud.$Node.ovn-nbdb-Logical_Router_Static_Route.gauge-ovn_nbdb_Logical_Router_Static_Route, 'ovn_nbdb_Logical_Router_Static_Route')
- target: alias($Cloud.$Node.ovn-nbdb-Logical_Switch.gauge-ovn_nbdb_Logical_Switch, 'ovn_nbdb_Logical_Switch')
- target: alias($Cloud.$Node.ovn-nbdb-Logical_Switch_Port.gauge-ovn_nbdb_Logical_Switch_Port, 'ovn_nbdb_Logical_Switch_Port')
- target: alias($Cloud.$Node.ovn-nbdb-Port_Group.gauge-ovn_nbdb_Port_Group, 'ovn_nbdb_Port_Group')

View File

@ -3,6 +3,6 @@ HOSTNAME="${COLLECTD_HOSTNAME:-`hostname -f`}"
INTERVAL="${COLLECTD_INTERVAL:-15}"
while sleep "$INTERVAL"; do
VALUE=$(sudo ovsdb-client dump unix:/var/lib/openvswitch/ovn/ovn$1_db.sock $2 | wc -l)
echo "PUTVAL \"$HOSTNAME/ovn-$2/gauge-ovn_$2\" interval=$INTERVAL N:$VALUE"
VALUE=$(sudo ovsdb-client dump --no-headings unix:/var/lib/openvswitch/ovn/ovn$1_db.sock $2 | wc -l)
echo "PUTVAL \"$HOSTNAME/ovn-$1db-$2/gauge-ovn_$1db_$2\" interval=$INTERVAL N:$VALUE"
done