Skip to content

Commit

Permalink
Merge pull request #480 from sipcapture/fix_time
Browse files Browse the repository at this point in the history
fixed nodename in case defined targetName
  • Loading branch information
adubovikov authored Aug 26, 2021
2 parents 524c02b + 866157c commit 77b72a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package config

const Version = "heplify-server 1.55"
const Version = "heplify-server 1.56"

var Setting HeplifyServer

Expand Down
6 changes: 3 additions & 3 deletions metric/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ func (p *Prometheus) expose(hCh chan *decoder.HEP) {
var srcHit, dstHit bool
srcTarget, srcHit = p.TargetMap[pkt.SrcIP]
if srcHit {
methodResponses.WithLabelValues(srcTarget, "src", "", pkt.SIP.FirstMethod, pkt.SIP.CseqMethod).Inc()
methodResponses.WithLabelValues(srcTarget, "src", pkt.NodeName, pkt.SIP.FirstMethod, pkt.SIP.CseqMethod).Inc()

if pkt.SIP.ReasonVal != "" && strings.Contains(pkt.SIP.ReasonVal, "850") {
reasonCause.WithLabelValues(srcTarget, extractXR("cause=", pkt.SIP.ReasonVal), pkt.SIP.FirstMethod).Inc()
}
}
dstTarget, dstHit = p.TargetMap[pkt.DstIP]
if dstHit {
methodResponses.WithLabelValues(dstTarget, "dst", "", pkt.SIP.FirstMethod, pkt.SIP.CseqMethod).Inc()
methodResponses.WithLabelValues(dstTarget, "dst", pkt.NodeName, pkt.SIP.FirstMethod, pkt.SIP.CseqMethod).Inc()
}
if !srcHit && !dstHit {
methodResponses.WithLabelValues("unknown", "", "", pkt.SIP.FirstMethod, pkt.SIP.CseqMethod).Inc()
methodResponses.WithLabelValues("unknown", "", pkt.NodeName, pkt.SIP.FirstMethod, pkt.SIP.CseqMethod).Inc()
}
}

Expand Down

0 comments on commit 77b72a8

Please sign in to comment.