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

Add nginx_up gauge #12

Merged

Conversation

matsumana
Copy link
Contributor

I want to check the nginx is up.
so add nginx_up like a mysqld_exporter

@matsumana
Copy link
Contributor Author

Hello.
Would you please review this?

@discordianfish
Copy link
Owner

Sorry for not spotting this earlier. Right now the scrape should fail if nginx is unreachable. You can use the up mertric for monitoring this.

@matsumana
Copy link
Contributor Author

Thank you for your reply.

Right now the scrape should fail if nginx is unreachable. You can use the up mertric for monitoring this.

It seemed that no up metrics did not exist. so I sent this PR, is it already exists?

@discordianfish
Copy link
Owner

The up metric is provided by Prometheus itself. It's 0 if a configured target failed: https://prometheus.io/docs/concepts/jobs_instances/
Going to close this here for now. We can reopen if I missed something.

@seelensonne
Copy link

The up metric is 0 if the scrape itself fails. But if the scrape succeeds (i.e., Prometheus was able to talk to the exporter), then the nginx_up metric would tell if Nginx is up (1) or not (0).

@discordianfish
Copy link
Owner

Fair enough

@discordianfish discordianfish reopened this Oct 9, 2017
@discordianfish discordianfish merged commit d27432d into discordianfish:master Oct 9, 2017
@seelensonne
Copy link

Awseome! Thank you and @matsumana.

@matsumana
Copy link
Contributor Author

Thank you, too.

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.

None yet

3 participants