collectd / collectd

The system statistics collection daemon. Please send Pull Requests here!
http://collectd.org
Other
3.19k stars 1.23k forks source link

write_sensu plugin: Please escape slash character #1331

Open elisi2000 opened 9 years ago

elisi2000 commented 9 years ago

Hi In addition to the list of characters replacement for sensu "to be happy". Please add the slash charcter

case '/': origname[i] = ''; break;

Thanks

mfournier commented 9 years ago

@jtyr any thoughts about this ?

jtyr commented 9 years ago

Is there somewhere a list of allowed characters for the Sensu names?

I think it would be better to change the way how the special characters are replaced to allow only an explicit set of characters (e.g.: a-zA-Z0-9.-) and replace anything else by "".

octo commented 8 years ago

@elisi2000 Is this an actual problem you're having? Slashes are not allowed in collectd metric identifiers and should therefore not appear in the data being passed to the _writesensu plugin – they're replaced by underscores (_) in plugin_dispatch_values_internal().

@jtyr The closest to a reference documentation I've found is https://sensuapp.org/docs/latest/clients#anatomy-of-a-check-result