Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
a0528314
Commit
a0528314
authored
Oct 04, 2011
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add rrd API for openvz
parent
cd3753f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
0 deletions
+89
-0
OpenVZ.pm
PVE/API2/OpenVZ.pm
+89
-0
No files found.
PVE/API2/OpenVZ.pm
View file @
a0528314
...
@@ -278,6 +278,95 @@ __PACKAGE__->register_method({
...
@@ -278,6 +278,95 @@ __PACKAGE__->register_method({
return
$res
;
return
$res
;
}});
}});
__PACKAGE__
->
register_method
({
name
=>
'
rrd
',
path
=>
'
{vmid}/rrd
',
method
=>
'
GET
',
protected
=>
1
,
# fixme: can we avoid that?
permissions
=>
{
path
=>
'
/vms/{vmid}
',
privs
=>
[
'
VM.Audit
'
],
},
description
=>
"
Read VM RRD statistics (returns PNG)
",
parameters
=>
{
additionalProperties
=>
0
,
properties
=>
{
node
=>
get_standard_option
('
pve-node
'),
vmid
=>
get_standard_option
('
pve-vmid
'),
timeframe
=>
{
description
=>
"
Specify the time frame you are interested in.
",
type
=>
'
string
',
enum
=>
[
'
hour
',
'
day
',
'
week
',
'
month
',
'
year
'
],
},
ds
=>
{
description
=>
"
The list of datasources you want to display.
",
type
=>
'
string
',
format
=>
'
pve-configid-list
',
},
cf
=>
{
description
=>
"
The RRD consolidation function
",
type
=>
'
string
',
enum
=>
[
'
AVERAGE
',
'
MAX
'
],
optional
=>
1
,
},
},
},
returns
=>
{
type
=>
"
object
",
properties
=>
{
filename
=>
{
type
=>
'
string
'
},
},
},
code
=>
sub
{
my
(
$param
)
=
@_
;
return
PVE::Cluster::
create_rrd_graph
(
"
pve2-vm/
$param
->{vmid}
",
$param
->
{
timeframe
},
$param
->
{
ds
},
$param
->
{
cf
});
}});
__PACKAGE__
->
register_method
({
name
=>
'
rrddata
',
path
=>
'
{vmid}/rrddata
',
method
=>
'
GET
',
protected
=>
1
,
# fixme: can we avoid that?
permissions
=>
{
path
=>
'
/vms/{vmid}
',
privs
=>
[
'
VM.Audit
'
],
},
description
=>
"
Read VM RRD statistics
",
parameters
=>
{
additionalProperties
=>
0
,
properties
=>
{
node
=>
get_standard_option
('
pve-node
'),
vmid
=>
get_standard_option
('
pve-vmid
'),
timeframe
=>
{
description
=>
"
Specify the time frame you are interested in.
",
type
=>
'
string
',
enum
=>
[
'
hour
',
'
day
',
'
week
',
'
month
',
'
year
'
],
},
cf
=>
{
description
=>
"
The RRD consolidation function
",
type
=>
'
string
',
enum
=>
[
'
AVERAGE
',
'
MAX
'
],
optional
=>
1
,
},
},
},
returns
=>
{
type
=>
"
array
",
items
=>
{
type
=>
"
object
",
properties
=>
{},
},
},
code
=>
sub
{
my
(
$param
)
=
@_
;
return
PVE::Cluster::
create_rrd_data
(
"
pve2-vm/
$param
->{vmid}
",
$param
->
{
timeframe
},
$param
->
{
cf
});
}});
__PACKAGE__
->
register_method
({
__PACKAGE__
->
register_method
({
name
=>
'
vm_config
',
name
=>
'
vm_config
',
path
=>
'
{vmid}/config
',
path
=>
'
{vmid}/config
',
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment