I'm running cacti 0.8.7i with the patches in mantis bug #0002149 to provide the 'rewrite_value' function (which I gather is in cacti 0.8.8 ).
It seems the syntax for rewrite_value is the same as PHP's 'serialize' function (which I know nothing about), but has an example in the docs (http://docs.cacti.net/manual:088:3a_advanced_topics.3_data_queries
). I have managed to dig out the basic syntax, but have hit a problem.
An SNMP OID returns a (multi-word) string value, which typically ends in the word 'temperature'. What I wanted to do was use rewrite_value to remove that word from the value returned to cacti.
So, for example, 'module 5 outlet temperature' => 'module 5 outlet'. With regular expressions I would basically do '^(.*) temperature$' and then pass that captured group as the value. However, I have no idea what the syntax is in rewrite_value for captured groups
Can anyone provide any help with this please?