this gets the cached ceph performance data back from pmxcfs Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> --- PVE/API2/Cluster/Ceph.pm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/PVE/API2/Cluster/Ceph.pm b/PVE/API2/Cluster/Ceph.pm index fa79d077..31373ef2 100644 --- a/PVE/API2/Cluster/Ceph.pm +++ b/PVE/API2/Cluster/Ceph.pm @@ -40,6 +40,7 @@ __PACKAGE__->register_method ({ { name => 'metadata' }, { name => 'status' }, { name => 'flags' }, + { name => 'iostat' }, ]; return $result; @@ -131,6 +132,29 @@ __PACKAGE__->register_method ({ } }); +__PACKAGE__->register_method ({ + name => 'iostat', + path => 'iostat', + method => 'GET', + description => "Get cached ceph io status.", + protected => 1, + permissions => { + check => ['perm', '/', [ 'Sys.Audit', 'Datastore.Audit' ], any => 1], + }, + parameters => { + additionalProperties => 0, + properties => { }, + }, + returns => { type => 'array' }, + code => sub { + my ($param) = @_; + + PVE::Ceph::Tools::check_ceph_inited(); + + return PVE::Ceph::Services::get_cached_perf_data(); + } +}); + my $possible_flags = PVE::Ceph::Tools::get_possible_osd_flags(); my $possible_flags_list = [ sort keys %$possible_flags ]; -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel