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
7a48c7b7
Commit
7a48c7b7
authored
Nov 15, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ceph log view
parent
7932cae3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
Ceph.pm
PVE/API2/Ceph.pm
+58
-0
Ceph.js
www/manager/node/Ceph.js
+6
-0
No files found.
PVE/API2/Ceph.pm
View file @
7a48c7b7
...
...
@@ -266,6 +266,7 @@ __PACKAGE__->register_method ({
{
name
=>
'
status
'
},
{
name
=>
'
crush
'
},
{
name
=>
'
config
'
},
{
name
=>
'
log
'
},
];
return
$result
;
...
...
@@ -834,4 +835,61 @@ __PACKAGE__->register_method ({
return
$txt
;
}});
__PACKAGE__
->
register_method
({
name
=>
'
log
',
path
=>
'
log
',
method
=>
'
GET
',
description
=>
"
Read ceph log
",
proxyto
=>
'
node
',
permissions
=>
{
check
=>
['
perm
',
'
/nodes/{node}
',
[
'
Sys.Syslog
'
]],
},
protected
=>
1
,
parameters
=>
{
additionalProperties
=>
0
,
properties
=>
{
node
=>
get_standard_option
('
pve-node
'),
start
=>
{
type
=>
'
integer
',
minimum
=>
0
,
optional
=>
1
,
},
limit
=>
{
type
=>
'
integer
',
minimum
=>
0
,
optional
=>
1
,
},
},
},
returns
=>
{
type
=>
'
array
',
items
=>
{
type
=>
"
object
",
properties
=>
{
n
=>
{
description
=>
"
Line number
",
type
=>
'
integer
',
},
t
=>
{
description
=>
"
Line text
",
type
=>
'
string
',
}
}
}
},
code
=>
sub
{
my
(
$param
)
=
@_
;
my
$rpcenv
=
PVE::RPCEnvironment::
get
();
my
$user
=
$rpcenv
->
get_user
();
my
$node
=
$param
->
{
node
};
my
$logfile
=
"
/var/log/ceph/ceph.log
";
my
(
$count
,
$lines
)
=
PVE::Tools::
dump_logfile
(
$logfile
,
$param
->
{
start
},
$param
->
{
limit
});
$rpcenv
->
set_result_attrib
('
total
',
$count
);
return
$lines
;
}});
www/manager/node/Ceph.js
View file @
7a48c7b7
...
...
@@ -463,6 +463,12 @@ Ext.define('PVE.node.Ceph', {
title
:
'
Crush
'
,
xtype
:
'
pveNodeCephCrushMap
'
,
itemId
:
'
crushmap
'
},
{
title
:
'
Log
'
,
itemId
:
'
log
'
,
xtype
:
'
pveLogView
'
,
url
:
"
/api2/extjs/nodes/
"
+
nodename
+
"
/ceph/log
"
}
],
listeners
:
{
...
...
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