Skip to content

Commit

Permalink
Merge pull request #5101 from psafont/move-dss-dump
Browse files Browse the repository at this point in the history
CA-379929: move json dump out of the rrdd plugin directory
  • Loading branch information
lindig authored Jul 12, 2023
2 parents ef4c426 + 8dfd16c commit a0ddf04
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions ocaml/xcp-rrdd/bin/rrdd/xcp_rrdd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,7 @@ let do_monitor_write xc writers =
let uuid_domids = List.map (fun (_, u, i) -> (u, i)) domains in
Rrdd_monitor.update_rrds timestamp stats uuid_domids my_paused_vms ;

(* Dump to /dev/shm/metrics/host-dss *)
Rrdd_server.Plugin.get_path "host-dss"
Rrdd_libs.Constants.datasource_dump_file
|> Rrdd_server.dump_host_dss_to_file
)

Expand Down
9 changes: 5 additions & 4 deletions ocaml/xcp-rrdd/lib/rrdd/constants.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*)
(* constants which are global across all the tools *)

let ( // ) = Filename.concat

let get_vm_rrd = "vm_rrd"

let get_vm_rrd_uri = "/" ^ get_vm_rrd
Expand Down Expand Up @@ -49,8 +51,7 @@ let rrd_location = Filename.concat "/var/lib/xcp" "blobs/rrds"
(* Blob storage location. *)
let blob_location = Filename.concat "/var/lib/xcp" "blobs"

let version_major = 1

let version_minor = 0
(* Location of json dump for NRPE to read them *)
let datasource_dump_file = "/dev/shm" // "host-metrics.json"

let rrdd_user_agent = Printf.sprintf "rrdd/%d.%d" version_major version_minor
let rrdd_user_agent = "rrdd" // Xapi_version.version
1 change: 1 addition & 0 deletions ocaml/xcp-rrdd/lib/rrdd/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
threads.posix
xapi-log
xapi-stdext-threads
xapi_version
)
)

1 change: 1 addition & 0 deletions xapi-rrdd.opam
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ depends: [
"ezxenstore"
"uuid"
"xapi-backtrace"
"xapi-consts"
"xapi-idl"
"xapi-rrd"
"xapi-rrd-transport"
Expand Down

0 comments on commit a0ddf04

Please sign in to comment.