Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Add support for local metric collection/viewing #4170

Merged
merged 4 commits into from
May 6, 2019

Conversation

jackcmay
Copy link
Contributor

@jackcmay jackcmay commented May 6, 2019

Problem

Summary of Changes

Fixes #

@mvines
Copy link
Contributor

mvines commented May 6, 2019

Seeing this patch, the goodness under scripts/local-metrics/ seems to feel like it would fit better at metrics/scripts. wdyt?

@jackcmay jackcmay requested a review from mvines May 6, 2019 20:04
@mvines mvines requested a review from danpaul000 May 6, 2019 22:10
@mvines
Copy link
Contributor

mvines commented May 6, 2019

@danpaul000 should review this too, I added him

export INFLUX_USERNAME=admin
export INFLUX_PASSWORD=admin

export SOLANA_METRICS_CONFIG="host=$INFLUX_HOST,db=$INFLUX_DATABASE,u=$INFLUX_USERNAME,p=$INFLUX_PASSWORD"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about just setting this env var, then running scripts/configure-metrics.sh to set all the INFLUX vars...less places to change in the future

Copy link
Contributor Author

@jackcmay jackcmay May 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed weird to call over to configure-metrics.sh. Maybe should move configure-metrics.sh and metrics-write-datapoint.sh to /metrics/scripts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving seems better longer term but that's gonna cause some painful churn. I vote to call down for now with a TODO in this file to consider moving those two scripts later

--volume "$PWD"/influxdb.conf:/etc/influxdb/influxdb.conf:ro \
--volume "$PWD"/lib/influxdb:/var/lib/influxdb \
-e INFLUXDB_DB=local \
-e INFLUXDB_ADMIN_USER=admin \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: fix indent. Also use long arg, --env for consistency

@jackcmay
Copy link
Contributor Author

jackcmay commented May 6, 2019

@mvines Think we should move this local metrics stuff into ./metrics/scripts/local?

@mvines
Copy link
Contributor

mvines commented May 6, 2019

@mvines Think we should move this local metrics stuff into ./metrics/scripts/local?

Too nested! Instead I want to generalize /metrics/scripts into something that works for metrics.solana.com and testnet-specific metrics instances as well (probably defaulting to "local"), as future work

@jackcmay jackcmay merged commit 453fdb9 into solana-labs:master May 6, 2019
@jackcmay jackcmay deleted the local-metrics branch May 6, 2019 23:45
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.

3 participants