Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

SKIPT_LIST is now a regex finder instead of having to especify the exact metric name #96

Closed
wants to merge 5 commits into from

Conversation

Itxaka
Copy link

@Itxaka Itxaka commented Jul 8, 2014

Hello there!

This adds a regex to the in_skip_list check so it will work with partial names for metric names.

This is a lifesaver in cases where you are generating the metrics automatically from an undetermined number of machines which can grow at any given moment.

I'll just explain our case, we have some ganglia metrics in our platform so I made a script that extracts them and sends them to horizon. The metric name is automatically generated from the platform_name.machine_name.metric_origin.metric_name and this machines can come up at any moment or go down at any moment so its not feasible to set the skip_list to anything as the platform name can change, and the machine name as well.

So in order to ignore metrics like whatever.whatever.hdd.BytesRead this regex will match either the origin (so we will use '.hdd.' to ignore all hdd metrics) or just the BytesRead metric ('.BytesRead').

Also, the old metrics will still match (so 'platform1.mysql.sda1.BytesRead' will only match that metric)

@Itxaka
Copy link
Author

Itxaka commented Jul 8, 2014

This also Closes #39

@astanway
Copy link
Contributor

astanway commented Jul 8, 2014

Hmm, wonder what's wrong with Travis? @jonlives any clues? Maybe related to c30359a?

@Itxaka
Copy link
Author

Itxaka commented Jul 8, 2014

Seems like pep8 errors in listen.py, I fixed them as well :)

@Itxaka
Copy link
Author

Itxaka commented Jul 8, 2014

Damn, build failed because mock failed to download :(, can anyone restart the CI build?

@Itxaka
Copy link
Author

Itxaka commented Jul 9, 2014

Ups, didn't want to send that last commit..yet!

…the SMTP settings from the settings.SMTP dictionary
@Itxaka
Copy link
Author

Itxaka commented Jul 9, 2014

Now, added as well the checking of the SMTP settings from the settings file as it made no sense to have them hardcoded.

Also, changed the GRAPH_URL stuff a bit, so in skyline installations that do not have it set, it won't add a nonexistant link to the mail body.

And send_alerts now uses regex as well.

Sorry for piling up the changes on this, but rigth now we are using my fork in production, so any change I do it's actually pushed to this, because I was dumb enough to not create a branch for my changes.

Let me know if we can keep this or do you want me to remove and do it properly :)

@Itxaka Itxaka closed this Jul 21, 2016
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.

2 participants