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

Added check and switch for Varnish 4 #105

Merged
merged 1 commit into from
Feb 1, 2015
Merged

Added check and switch for Varnish 4 #105

merged 1 commit into from
Feb 1, 2015

Conversation

jamtur01
Copy link
Member

@jamtur01 jamtur01 commented Feb 1, 2015

Fixes #104.

Varnish 4+ changes the field names for Varnish statistics fields.

This change runs varnishstats -V (using popen3 because Varnish outputs
all version information to stderr and not stdout) and captures the
version via a regex.

A case statement switches on the version. A 4 or higher results in using
the new fields. Otherwise it defaults to the Varnish 3.x field names.

The command also had to change because the -f option no longer
supports a comma-separated list and now requires a glob or multiple
instantiations.

Fixes #104.

Varnish 4+ changes the field names for Varnish statistics fields.

This change runs varnishstats -V (using popen3 because Varnish outputs
all version information to stderr and not stdout) and captures the
version via a regex.

A case statement switches on the version. A 4 or higher results in using
the new fields. Otherwise it defaults to the Varnish 3.x field names.

The command also had to change because the `-f` option no longer
supports a comma-separated list and now requires a glob or multiple
instantiations.
@aphyr
Copy link
Collaborator

aphyr commented Feb 1, 2015

Awesome, thanks James. :)

aphyr added a commit that referenced this pull request Feb 1, 2015
Added check and switch for Varnish 4
@aphyr aphyr merged commit 3cd603d into riemann:master Feb 1, 2015
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.

riemann-varnish not working with Varnish 4+
2 participants