Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Fix Traffic Monitor 2.0 to get config options from Traffic Ops health endpoint#21

Closed
rob05c wants to merge 20 commits intoapache:masterfrom
rob05c:tm2
Closed

Fix Traffic Monitor 2.0 to get config options from Traffic Ops health endpoint#21
rob05c wants to merge 20 commits intoapache:masterfrom
rob05c:tm2

Conversation

@rob05c
Copy link
Member

@rob05c rob05c commented Oct 28, 2016

No description provided.

Fixes Traffic Monitor 2.0 to get per-cache (profile) connection
timeout, max history; and threshold kbps, load average, and query
time from the Traffic Ops /health/{cdn-name} endpoint.
Fixes Traffic Monitor 2.0's available bandwidth threshold to subtract
the parameter value from the capacity. It was incorrectly comparing
the value itself.
rob05c added 16 commits October 31, 2016 16:08
Fixes Trafic Monitor 2.0 polling to sleep a random time between 0
and the poll interval. This prevents polling all caches at once
every tick.

Fixes to poll precisely on the interval, by recreating the ticker.
The Go `Ticker` attempts to 'smooth' polls, increasing or decreasing
poll times to compensate for slow poll processing. This fixes it to
poll at precisely the given interval.
Changes the Traffic Monitor example config stat and health poll flush
intervals from 200ms to 20ms. This appears to be more reasonable, and
to do a better job of averaging new polls, preventing poll times from
'stacking up'.
Adds Traffic Monitor 2.0 config setting for health-to-stat ration.
This is only used if a 'health' poll interval exists in Traffic Ops
but no 'stat' interval, which is the case for Traffic Monitor 2.0.

If both 'health' and 'stat' exist, they will be used appropriately
and this config setting will be ignored. If only 'health' exists, it
will be used for 'stat' (which is the big query, like the only query
in Traffic Monitor 1.0), and 'health' will be the given ratio. For
example, to set the health poll at a quarter the stat poll, set the
config value to 4. So, a stat poll of 8 becomes 8/4=2 seconds. To use
the same value for both, set the config to 1.

This only exists to make it possible to poll health at a faster
rate in an existing Traffic Control deployment with no parameter
changes. Once deployed, the parameters should be set appropriately
and this config will not be used.
Adds `log.Close` and `log.Closef`, which call `Close` on a given
`io.Closer`, and log any error, along with given context. This allows
succinctly calling `defer log.Close(resp.Body` to log, while retaining
the convenience, brevity, and idiomaticy of `defer`.
@asfgit asfgit closed this in 7e34e01 Nov 7, 2016
rimashah25 pushed a commit to rimashah25/trafficcontrol that referenced this pull request Dec 4, 2023
…pache#21)

* nitial changes

* Maple auth and query working

* Maple auth working, placeholder for queries for now

* Cleanup and final changes

* Refactor and code review

* Remove extra blank line, go fmt

* Adding tests

* formatting

* WIP

* maple query for kbps mid working

* database name/ table name changes

* summary stats

* do not divide by 8, already being done in maple query

* series query fixed

* fixed percentiles, totalKB

* readme changes

* adding tests

* revert unneeded changes

* revert unneeded changes

* formatting

* add blank line, go fmt tests

* Adding kbps metric

* Making changes for the tps queries

* Adding more tests

* Changing metric names

* code review fixes

* Fix build

* fix test

* fixing go vendor pkg dependencies

* Code review fixes

* README changes

* change import sequence

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Weasel build fixes (apache#22)

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Add remaining metrics: avg_ttms and origin_offload for Maple/TO integration (apache#23)

* Initial changes for avg_ttms

* add origin_offload metric and tests

* Moving gonum pkg to the root vendor dir, for compatibility with go modules

* changing the route from 3.1 to 3.0

* Changing the route back to 3.1

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Changing the ds_stats route from 3.1 to 3.0

TO should point to Maple, instead of influxdb to get delivery_stats (apache#21)

* nitial changes

* Maple auth and query working

* Maple auth working, placeholder for queries for now

* Cleanup and final changes

* Refactor and code review

* Remove extra blank line, go fmt

* Adding tests

* formatting

* WIP

* maple query for kbps mid working

* database name/ table name changes

* summary stats

* do not divide by 8, already being done in maple query

* series query fixed

* fixed percentiles, totalKB

* readme changes

* adding tests

* revert unneeded changes

* revert unneeded changes

* formatting

* add blank line, go fmt tests

* Adding kbps metric

* Making changes for the tps queries

* Adding more tests

* Changing metric names

* code review fixes

* Fix build

* fix test

* fixing go vendor pkg dependencies

* Code review fixes

* README changes

* change import sequence

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Weasel build fixes (apache#22)

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Add remaining metrics: avg_ttms and origin_offload for Maple/TO integration (apache#23)

* Initial changes for avg_ttms

* add origin_offload metric and tests

* Moving gonum pkg to the root vendor dir, for compatibility with go modules

* changing the route from 3.1 to 3.0

* Changing the route back to 3.1

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Changing the ds_stats route from 3.1 to 3.0

change route prefix to 3.1 (apache#26)

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>
(cherry picked from commit 85037a0)

Maple TO plugin improvements (apache#27)

* updating plugin paths to not be hardcoded

* Summary query missing limit

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Restructuring the queries so that Trickster picks them up (apache#29)

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Don't log error when request is unhandled

(cherry picked from commit 9762cf78958fa7a460301c218d2a73082099016a)

Change queries for maple upgrade (apache#30)

* Change the query structure, in order to comply with Maple upgrades

* code review

Adding maple logging for failure cases (apache#33)

* Adding maple logging for failure cases

* code review changes

Adding Maple error response to logs (apache#34)

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Disney tps pssc aggregate and cache_efficiency metrics (apache#35)

* Initial changes for new tps_all metrics

* making sure output is in correct format

* add cache_efficiency metric

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Add cache_capacity to deliveryservice-stats plugin (apache#36)

* add cache capacity

* Make cache_capacity work with series/summary

* Code review fixes

* Wrong case

Disney billing api (apache#37)

* Initial changes

* formatting

* remove unneeded return param

* cleanup

* remove code duplication

* remove unneeded mutex

* code review fixes

* change comparison logic

* address code review

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Adding new metric for disney (apache#38)

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Calculate Remaining Capacity for cache_capacity (apache#39)

* Calculate available based on current, correct units on available

* Add logging to bad conversion

Co-authored-by: shamrickus <shamrickus@gmail.com>

Determine capacity from parameter instead of TM (apache#42)

* Determine capacity from parameter

* gb -> gbps

Co-authored-by: shamrickus <shamrickus@gmail.com>

Disney billing info and contract api (apache#41)

* initial changes

* adding changes for info and contract APIs

* adding documentation and other changes

* renaming plugin

* rename plugin, remove debug statement

* revert unneeded commit

* remove TS changes

* license

* code review comments

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Disney documentation (apache#40)

* Adding documentation for Disney metrics

* adding documentation for a new metric

* Documentation

* license and cache capacity docs

* Improve cc docs

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>
Co-authored-by: shamrickus <shamrickus@gmail.com>

Add support to get responses by tenant (apache#43)

* Add support to get responses by tenant

* code review changes

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Pass routeID in context (apache#45)

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>

Pass route ID in the right format (apache#47)

Co-authored-by: Srijeet Chatterjee <srijeet0406@gmail.com>
rimashah25 pushed a commit to rimashah25/trafficcontrol that referenced this pull request Dec 4, 2023
* Update AuthService.js

instead of clearing all the localstorage, i changed to remove only redirect param which is used for sso login to redirect.

* Update CHANGELOG.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant