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
Closed
Fix Traffic Monitor 2.0 to get config options from Traffic Ops health endpoint#21rob05c wants to merge 20 commits intoapache:masterfrom
rob05c wants to merge 20 commits intoapache:masterfrom
Conversation
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.
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`.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.