[pve-devel] [manager] ***feature external metric***

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Feb 17 18:01:21 CET 2017


On 02/16/2017 11:24 AM, Daniel Gallego Sánchez wrote:
> Hi,
>
> To apply changes for Influxdb, do I have to re-upload the changes 
> without Graphite? Or is not necessary?

We can also do this changes for you.

But if its important for you that you get listed in the git history you 
will have to resend and sign our CLA, see:
https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and_Copyright

Else, as said, we can do it just for InfluxDB also if its to much hassle.

Thanks and cheers,
Thomas

>
> Thanks
>
>
> El 16/02/17 a las 09:22, Daniel Gallego Sánchez escribió:
>> Hi,
>>
>> I really need apply this changes for influxdb.
>>
>> Thanks!
>>
>> El 16/02/17 a las 09:13, Thomas Lamprecht escribió:
>>> Hi,
>>>
>>> On 02/16/2017 05:03 AM, Alexandre DERUMIER wrote:
>>>> Hi,
>>>>
>>>> for graphite this will break graph for sure if you move vm on 
>>>> different host
>>>
>>> Ok, thanks for confirming this.
>>>
>>> So, imo, if this needs to get applied I would just do it for influxdb
>>> and not use the nodename in graphite.
>>>
>>>> for influxdb no problem, it's just a tag.
>>>>
>>>>
>>>> ----- Mail original -----
>>>> De: "Daniel Gallego Sánchez" <danielgallegosanchez at gmail.com>
>>>> À: "pve-devel" <pve-devel at pve.proxmox.com>
>>>> Envoyé: Mercredi 15 Février 2017 18:13:53
>>>> Objet: [pve-devel] [manager]  ***feature external metric***
>>>>
>>>> From: Daniel1108 <danielgallegosanchez at gmail.com>
>>>>
>>>> I would like know if this feature will be accept.
>>>> Signed-off-by: Daniel1108 <danielgallegosanchez at gmail.com>
>>>> ---
>>>> PVE/Service/pvestatd.pm | 4 ++--
>>>> PVE/Status/Graphite.pm | 6 +++---
>>>> PVE/Status/InfluxDB.pm | 8 ++++----
>>>> PVE/Status/Plugin.pm | 4 ++--
>>>> 4 files changed, 11 insertions(+), 11 deletions(-)
>>>>
>>>> diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
>>>> index f6aaa30..28e497c 100755
>>>> --- a/PVE/Service/pvestatd.pm
>>>> +++ b/PVE/Service/pvestatd.pm
>>>> @@ -203,7 +203,7 @@ sub update_qemu_status {
>>>> my $plugin_config = $status_cfg->{ids}->{$id};
>>>> next if $plugin_config->{disable};
>>>> my $plugin = PVE::Status::Plugin->lookup($plugin_config->{type});
>>>> - $plugin->update_qemu_status($plugin_config, $vmid, $d, $ctime);
>>>> + $plugin->update_qemu_status($plugin_config, $vmid, $d, $ctime, 
>>>> $nodename);
>>>> }
>>>> }
>>>> }
>>>> @@ -403,7 +403,7 @@ sub update_lxc_status {
>>>> my $plugin_config = $status_cfg->{ids}->{$id};
>>>> next if $plugin_config->{disable};
>>>> my $plugin = PVE::Status::Plugin->lookup($plugin_config->{type});
>>>> - $plugin->update_lxc_status($plugin_config, $vmid, $d, $ctime);
>>>> + $plugin->update_lxc_status($plugin_config, $vmid, $d, $ctime, 
>>>> $nodename);
>>>> }
>>>> }
>>>> }
>>>> diff --git a/PVE/Status/Graphite.pm b/PVE/Status/Graphite.pm
>>>> index f8d95d1..f46cb2b 100644
>>>> --- a/PVE/Status/Graphite.pm
>>>> +++ b/PVE/Status/Graphite.pm
>>>> @@ -46,13 +46,13 @@ sub update_node_status {
>>>>
>>>> sub update_qemu_status {
>>>> my ($class, $plugin_config, $vmid, $data, $ctime) = @_;
>>>> - write_graphite_hash($plugin_config, $data, $ctime, "qemu.$vmid");
>>>> + write_graphite_hash($plugin_config, $data, $ctime, 
>>>> "qemu.$vmid.$nodename");
>>>> }
>>>>
>>>> sub update_lxc_status {
>>>> - my ($class, $plugin_config, $vmid, $data, $ctime) = @_;
>>>> + my ($class, $plugin_config, $vmid, $data, $ctime, $nodename) = @_;
>>>>
>>>> - write_graphite_hash($plugin_config, $data, $ctime, "lxc.$vmid");
>>>> + write_graphite_hash($plugin_config, $data, $ctime, 
>>>> "lxc.$vmid.$nodename");
>>>> }
>>>>
>>>> sub update_storage_status {
>>>> diff --git a/PVE/Status/InfluxDB.pm b/PVE/Status/InfluxDB.pm
>>>> index 0cce42b..7364e57 100644
>>>> --- a/PVE/Status/InfluxDB.pm
>>>> +++ b/PVE/Status/InfluxDB.pm
>>>> @@ -38,11 +38,11 @@ sub update_node_status {
>>>> }
>>>>
>>>> sub update_qemu_status {
>>>> - my ($class, $plugin_config, $vmid, $data, $ctime) = @_;
>>>> + my ($class, $plugin_config, $vmid, $data, $ctime, $nodename) = @_;
>>>>
>>>> $ctime *= 1000000000;
>>>>
>>>> - my $object = "object=qemu,vmid=$vmid";
>>>> + my $object = "object=qemu,vmid=$vmid,nodename=$nodename";
>>>> if($data->{name} && $data->{name} ne '') {
>>>> $object .= ",host=$data->{name}";
>>>> }
>>>> @@ -51,11 +51,11 @@ sub update_qemu_status {
>>>> }
>>>>
>>>> sub update_lxc_status {
>>>> - my ($class, $plugin_config, $vmid, $data, $ctime) = @_;
>>>> + my ($class, $plugin_config, $vmid, $data, $ctime, $nodename) = @_;
>>>>
>>>> $ctime *= 1000000000;
>>>>
>>>> - my $object = "object=lxc,vmid=$vmid";
>>>> + my $object = "object=lxc,vmid=$vmid,nodename=$nodename";
>>>> if($data->{name} && $data->{name} ne '') {
>>>> $object .= ",host=$data->{name}";
>>>> }
>>>> diff --git a/PVE/Status/Plugin.pm b/PVE/Status/Plugin.pm
>>>> index 070467c..ff7af89 100644
>>>> --- a/PVE/Status/Plugin.pm
>>>> +++ b/PVE/Status/Plugin.pm
>>>> @@ -62,13 +62,13 @@ sub update_node_status {
>>>> }
>>>>
>>>> sub update_qemu_status {
>>>> - my ($class, $plugin_config, $vmid, $data, $ctime) = @_;
>>>> + my ($class, $plugin_config, $vmid, $data, $ctime, $nodename) = @_;
>>>>
>>>> die "please implement inside plugin";
>>>> }
>>>>
>>>> sub update_lxc_status {
>>>> - my ($class, $plugin_config, $vmid, $data, $ctime) = @_;
>>>> + my ($class, $plugin_config, $vmid, $data, $ctime, $nodename) = @_;
>>>>
>>>> die "please implement inside plugin";
>>>> }
>>>
>>>
>>>
>>> _______________________________________________
>>> pve-devel mailing list
>>> pve-devel at pve.proxmox.com
>>> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel






More information about the pve-devel mailing list