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

fixed issue with regexp matching. #44

Closed
wants to merge 1 commit into from
Closed

fixed issue with regexp matching. #44

wants to merge 1 commit into from

Conversation

luqasz
Copy link
Contributor

@luqasz luqasz commented Jan 5, 2014

this patch will fix issue with regexp matching.
it sometimes happened to wrongly parse all data.

please see:
https://collectd.org/wiki/index.php/Naming_schema
for more information.

i do not know what is "category" for so i left it empty not to break anything. hopefully.
"varnish" is also something that i do not know what is for.

@pommi
Copy link
Owner

pommi commented Mar 22, 2014

Thanks for the pull request, but I can't include it. I don't really get "it sometimes happened to wrongly parse all data". Please give some examples so the regex can be fixed instead of creating 3 functions that do the same.

@pommi pommi closed this Mar 22, 2014
@luqasz
Copy link
Contributor Author

luqasz commented Mar 22, 2014

have you read ?
https://collectd.org/wiki/index.php/Naming_schema
you do not need regexp to pull data and parse it.

regarding "creating 3 functions that do the same"
no they do not do the same.
they are more readable then regexp

"it sometimes happened to wrongly parse all data"
yes it does happen. unfortunatelly i do not have a reproductive example.

@pommi
Copy link
Owner

pommi commented Mar 22, 2014

I'm fully aware of that page. CGP is completely based on that page, as is the regex. Except that the varnish plugin didn't fit it (explained here: e3f1cc2)

If you find a reproducible example, please report it and I will happily fix the regex.

@luqasz
Copy link
Contributor Author

luqasz commented Mar 24, 2014

ok i got a reproducable example.
create directory and rrd file as follows:
hostname/snmp/if_octets-.rrd

this will give you error messages in apache log file:
sh: 1: cannot open some-name: No such file
this is becouse there are no shellescapes and further no urlencode/decode
this fixes it.
https://github.com/uqasz/CGP/commit/77a3477d9d25996266c9bc30a4fc1aa090864385

@pommi
Copy link
Owner

pommi commented Jul 21, 2014

Should be fixed in #87

@pommi pommi closed this Jul 21, 2014
@pommi pommi mentioned this pull request Jul 23, 2014
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

2 participants