[pve-devel] [PATCH container] Proposed fix for #1326: Added secondary server to graphite plugin as secondary_server parameter. It may be required if graphite data needs to be mirrored as in the case here. Carbon-relay is too much...

Dominik Csapak d.csapak at proxmox.com
Fri Mar 31 11:30:05 CEST 2017


Hi,

On 03/31/2017 10:54 AM, Pavel Andreev wrote:
> Hi Dominik,
>>
>> 1. Did you read the http://pve.proxmox.com/wiki/Developer_Documentation ?
>> specially the part about the license and the Harmony CLA?
>> if not, please do so
>>
> yes, I did.

did you also send the signed cla ?

>
> I thought of this approach and even looked exactly to the Storage code
> and the header section but seemed to me my fix is simpler.
> Would you be able to advise a bit further how to give the entries names?


the code in pve/status/plugin.pm
which is relevant is this:


sub parse_section_header {
     my ($class, $line) = @_;

     if ($line =~ m/^(\S+):\s*$/) { <-- here we parse the "graphite: " line
	my $type = lc($1);
	my $errmsg = undef; # set if you want to skip whole section
	eval { PVE::JSONSchema::pve_verify_configid($type); };
	$errmsg = $@ if $@;
	my $config = {}; # to return additional attributes
	return ($type, $type, $errmsg, $config); <--- here the second return 
value is the id
     }
     return undef;
}

so you would have to parse

graphite: name

or so

and return (type, name,...)




More information about the pve-devel mailing list