Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer code to parent repository #1

Merged
merged 12 commits into from
Apr 13, 2015
Merged

Conversation

eugenechertikhin
Copy link
Contributor

No description provided.

./mysqld_exporter <flags>

## Configuration
The configuration is in JSON. An example with all possible options:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be better to be configurable entirely via flags rather than having to mess with json, there's not many possible options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMHO this is bad idea show login/password in process list.
But if you think this is needed - I will.

Copy link
Member

Choose a reason for hiding this comment

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

Hm, I'd have to agree for the credentials. Those should usually be in a config file or passed via an environment variable. @bjk-soundcloud @matthiasr any opinion on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, password would be a problem then.

Can we make the JSON structure simpler? I think config can be removed

Copy link
Member

Choose a reason for hiding this comment

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

Using env variables and then simply os.Getenv(...) could even be nicer. It doesn't require putting another file in the filesystem, finding it, etc. Your run script can simply set an env variable, no matter where the contents of that come from.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, config is extraneous.

I think the configuration file is fine for now. It won't be a big deal to add other ways later if desired.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will drop config file and parse env vars

Choose a reason for hiding this comment

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

+1 to ENV that contains the DSN0

@brian-brazil
Copy link
Contributor

This generally looks good, it'll be great to get this in.

You should add an AUTHORS.md and CONTRIBUTING.md

@bjk-soundcloud
Copy link

For reference, the ganglia0 mysqld python module is a good example of what can/needs to be scraped.

@bjk-soundcloud
Copy link

The MySQL documentation0 has some good information on the variables in SHOW GLOBAL STATUS

@@ -0,0 +1,5 @@
Exporter for mysql daemon
Copy link
Member

Choose a reason for hiding this comment

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

For repos within the prometheus org we'd like to be consistent with NOTICE, AUTHORS.md, etc. files. Could you make this:

Exporter for MySQL daemon.
Copyright 2015 The Prometheus Authors

The best place for initial authorship attribution would be in the AUTHORS.md file, like in this: https://github.com/prometheus/node_exporter/blob/master/AUTHORS.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@eugenechertikhin
Copy link
Contributor Author

@brian-brazil show slave status may be added in future. we are don't use it in our environment, so do not implement it in first version


rows, err := db.Query("SHOW STATUS")
if err != nil {
log.Printf("error running query on db")
Copy link
Member

Choose a reason for hiding this comment

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

I'd also log the error message:

log.Println("error running status query on database:", err)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@juliusv
Copy link
Member

juliusv commented Mar 26, 2015

@eugenechertikhin Heya, what's the state on this? Are you interested in resolving the remaining bits, or should we take it from here?

@eugenechertikhin
Copy link
Contributor Author

Hey Julius,
I will resolve in 2 days, sorry for delay - its depend on my main work. thanks for understanding

@juliusv
Copy link
Member

juliusv commented Mar 29, 2015

@eugenechertikhin Cool, no problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants