Skip to content

Commit 5d1e666

Browse files
Christian Lindiglindig
authored andcommitted
CP-42182 Add CLI tool on xe and rrd-cli to enable saving of rrds to local host
Backport of xapi-project/xen-api#4908 This is spread over multiple repositories in the backport. Signed-off-by: Christian Lindig <[email protected]>
1 parent e284caa commit 5d1e666

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

rrd/dune

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444

4545
(executable
4646
(name rrd_cli)
47+
(public_name rrd-cli)
48+
(package xapi-idl)
4749
(modules rrd_cli)
4850
(libraries
4951
cmdliner

rrd/rrd_cli.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let default_cmd =
1717
]
1818
in
1919
( Cmdliner.Term.(ret (const (fun _ -> `Help (`Pager, None)) $ const ()))
20-
, Cmdliner.Term.info "rrd_cli" ~version:(version_str Cmds.description) ~doc )
20+
, Cmdliner.Term.info "rrd-cli" ~version:(version_str Cmds.description) ~doc )
2121

2222
let cli () =
2323
let rpc = Rrd_client.rpc in

rrd/rrd_interface.ml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,15 @@ module RPC_API (R : RPC) = struct
246246
]
247247
(rem_addr_opt_p @-> unit_p @-> returning unit_p rrd_err)
248248

249+
let save_rrds =
250+
declare "save_rrds"
251+
[
252+
"Backs up RRD data to disk on localhost. This should be done \
253+
periodically to ensure"
254+
; "that if the host crashes we don't lose too much data."
255+
]
256+
(unit_p @-> returning unit_p rrd_err)
257+
249258
let archive_rrd =
250259
declare "archive_rrd"
251260
[

0 commit comments

Comments
 (0)