Skip to content

Commit

Permalink
Adding ability for ipv4Availability and ipv6Availability to TM (apach…
Browse files Browse the repository at this point in the history
  • Loading branch information
srijeet0406 committed Oct 2, 2022
1 parent 9d067cd commit b62fa17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
## [unreleased]
### Added
- [#6033](https://github.com/apache/trafficcontrol/issues/6033) Added ability to assign multiple server capabilities to a server.
- [Traffic Monitor] Added logging for `ipv4Availability` and `ipv6Availability` in TM.

### Fixed
- Traffic Stats: Reuse InfluxDB client handle to prevent potential connection leaks
Expand Down
4 changes: 2 additions & 2 deletions traffic_monitor/health/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ func (o *ThreadsafeEvents) Get() []Event {

// Add adds the given event. This is threadsafe for one writer, multiple readers. This MUST NOT be called by multiple threads, as it non-atomically fetches and adds.
func (o *ThreadsafeEvents) Add(e Event) {
// host="hostname", type=EDGE, available=true, msg="REPORTED - available"
log.Eventf(time.Time(e.Time), "host=\"%s\", type=%s, available=%t, msg=\"%s\"", e.Hostname, e.Type, e.Available, e.Description)
// host="hostname", type=EDGE, available=true, ipv4Available=true, ipv6Available=true, msg="REPORTED - available"
log.Eventf(time.Time(e.Time), "host=\"%s\", type=%s, available=%t, ipv4Available=%t, ipv6Available=%t, msg=\"%s\"", e.Hostname, e.Type, e.Available, e.IPv4Available, e.IPv6Available, e.Description)
o.m.Lock() // TODO test removing
events := copyEvents(*o.events)
e.Index = *o.nextIndex
Expand Down

0 comments on commit b62fa17

Please sign in to comment.