summaryrefslogtreecommitdiffstats
path: root/collectors/xenstat.plugin
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/xenstat.plugin')
-rw-r--r--collectors/xenstat.plugin/metadata.yaml181
-rw-r--r--collectors/xenstat.plugin/xenstat_plugin.c22
2 files changed, 192 insertions, 11 deletions
diff --git a/collectors/xenstat.plugin/metadata.yaml b/collectors/xenstat.plugin/metadata.yaml
new file mode 100644
index 000000000..610435a33
--- /dev/null
+++ b/collectors/xenstat.plugin/metadata.yaml
@@ -0,0 +1,181 @@
+meta:
+ plugin_name: xenstat.plugin
+ module_name: xenstat.plugin
+ monitored_instance:
+ name: Xen/XCP-ng
+ link: ''
+ categories:
+ - data-collection.containers-and-vms
+ icon_filename: 'xen.png'
+ related_resources:
+ integrations:
+ list: []
+ info_provided_to_referring_integrations:
+ description: ''
+ keywords: []
+ most_popular: false
+overview:
+ data_collection:
+ metrics_description: 'Monitor Xen/XCP-ng with Netdata for streamlined virtual machine performance and resource management. Optimize virtualization operations with real-time insights, built-in alerts, and anomaly advisor.'
+ method_description: ''
+ supported_platforms:
+ include: []
+ exclude: []
+ multi-instance: true
+ additional_permissions:
+ description: ''
+ default_behavior:
+ auto_detection:
+ description: ''
+ limits:
+ description: ''
+ performance_impact:
+ description: ''
+setup:
+ prerequisites:
+ list: []
+ configuration:
+ file:
+ name: ''
+ description: ''
+ options:
+ description: ''
+ folding:
+ title: ''
+ enabled: true
+ list: []
+ examples:
+ folding:
+ enabled: true
+ title: ''
+ list: []
+troubleshooting:
+ problems:
+ list: []
+alerts: []
+metrics:
+ folding:
+ title: Metrics
+ enabled: false
+ description: ""
+ availability: []
+ scopes:
+ - name: global
+ description: ""
+ labels: []
+ metrics:
+ - name: xenstat.mem
+ description: Memory Usage
+ unit: "MiB"
+ chart_type: stacked
+ dimensions:
+ - name: free
+ - name: used
+ - name: xenstat.domains
+ description: Number of Domains
+ unit: "domains"
+ chart_type: line
+ dimensions:
+ - name: domains
+ - name: xenstat.cpus
+ description: Number of CPUs
+ unit: "cpus"
+ chart_type: line
+ dimensions:
+ - name: cpus
+ - name: xenstat.cpu_freq
+ description: CPU Frequency
+ unit: "MHz"
+ chart_type: line
+ dimensions:
+ - name: frequency
+ - name: xendomain
+ description: ""
+ labels: []
+ metrics:
+ - name: xendomain.states
+ description: Domain States
+ unit: "boolean"
+ chart_type: line
+ dimensions:
+ - name: running
+ - name: blocked
+ - name: paused
+ - name: shutdown
+ - name: crashed
+ - name: dying
+ - name: xendomain.cpu
+ description: CPU Usage (100% = 1 core)
+ unit: "percentage"
+ chart_type: line
+ dimensions:
+ - name: used
+ - name: xendomain.mem
+ description: Memory Reservation
+ unit: "MiB"
+ chart_type: line
+ dimensions:
+ - name: maximum
+ - name: current
+ - name: xendomain.vcpu
+ description: CPU Usage per VCPU
+ unit: "percentage"
+ chart_type: line
+ dimensions:
+ - name: a dimension per vcpu
+ - name: xendomain, vbd
+ description: ""
+ labels: []
+ metrics:
+ - name: xendomain.oo_req_vbd
+ description: VBD{%u} Out Of Requests
+ unit: "requests/s"
+ chart_type: line
+ dimensions:
+ - name: requests
+ - name: xendomain.requests_vbd
+ description: VBD{%u} Requests
+ unit: "requests/s"
+ chart_type: line
+ dimensions:
+ - name: read
+ - name: write
+ - name: xendomain.sectors_vbd
+ description: VBD{%u} Read/Written Sectors
+ unit: "sectors/s"
+ chart_type: line
+ dimensions:
+ - name: read
+ - name: write
+ - name: xendomain, network
+ description: ""
+ labels: []
+ metrics:
+ - name: xendomain.bytes_network
+ description: Network{%u} Received/Sent Bytes
+ unit: "kilobits/s"
+ chart_type: line
+ dimensions:
+ - name: received
+ - name: sent
+ - name: xendomain.packets_network
+ description: Network{%u} Received/Sent Packets
+ unit: "packets/s"
+ chart_type: line
+ dimensions:
+ - name: received
+ - name: sent
+ - name: xendomain.errors_network
+ description: Network{%u} Receive/Transmit Errors
+ unit: "errors/s"
+ chart_type: line
+ dimensions:
+ - name: received
+ - name: sent
+ - name: xendomain.drops_network
+ description: Network{%u} Receive/Transmit Drops
+ unit: "drops/s"
+ chart_type: line
+ dimensions:
+ - name: received
+ - name: sent
diff --git a/collectors/xenstat.plugin/xenstat_plugin.c b/collectors/xenstat.plugin/xenstat_plugin.c
index b0cfa0b2f..acd072605 100644
--- a/collectors/xenstat.plugin/xenstat_plugin.c
+++ b/collectors/xenstat.plugin/xenstat_plugin.c
@@ -178,7 +178,7 @@ static struct domain_metrics *domain_metrics_free(struct domain_metrics *d) {
}
if(unlikely(!cur)) {
- error("XENSTAT: failed to free domain metrics.");
+ netdata_log_error("XENSTAT: failed to free domain metrics.");
return NULL;
}
@@ -242,7 +242,7 @@ static int vcpu_metrics_collect(struct domain_metrics *d, xenstat_domain *domain
vcpu = xenstat_domain_vcpu(domain, i);
if(unlikely(!vcpu)) {
- error("XENSTAT: cannot get VCPU statistics.");
+ netdata_log_error("XENSTAT: cannot get VCPU statistics.");
return 1;
}
@@ -288,7 +288,7 @@ static int vbd_metrics_collect(struct domain_metrics *d, xenstat_domain *domain)
vbd = xenstat_domain_vbd(domain, i);
if(unlikely(!vbd)) {
- error("XENSTAT: cannot get VBD statistics.");
+ netdata_log_error("XENSTAT: cannot get VBD statistics.");
return 1;
}
@@ -336,7 +336,7 @@ static int network_metrics_collect(struct domain_metrics *d, xenstat_domain *dom
network = xenstat_domain_network(domain, i);
if(unlikely(!network)) {
- error("XENSTAT: cannot get network statistics.");
+ netdata_log_error("XENSTAT: cannot get network statistics.");
return 1;
}
@@ -368,7 +368,7 @@ static int xenstat_collect(xenstat_handle *xhandle, libxl_ctx *ctx, libxl_dominf
xenstat_node *node = xenstat_get_node(xhandle, XENSTAT_ALL);
if (unlikely(!node)) {
- error("XENSTAT: failed to retrieve statistics from libxenstat.");
+ netdata_log_error("XENSTAT: failed to retrieve statistics from libxenstat.");
return 1;
}
@@ -388,7 +388,7 @@ static int xenstat_collect(xenstat_handle *xhandle, libxl_ctx *ctx, libxl_dominf
// get domain UUID
unsigned int id = xenstat_domain_id(domain);
if(unlikely(libxl_domain_info(ctx, info, id))) {
- error("XENSTAT: cannot get domain info.");
+ netdata_log_error("XENSTAT: cannot get domain info.");
}
else {
snprintfz(uuid, LIBXL_UUID_FMTLEN, LIBXL_UUID_FMT "\n", LIBXL_UUID_BYTES(info->uuid));
@@ -989,7 +989,7 @@ int main(int argc, char **argv) {
exit(1);
}
- error("xenstat.plugin: ignoring parameter '%s'", argv[i]);
+ netdata_log_error("xenstat.plugin: ignoring parameter '%s'", argv[i]);
}
errno = 0;
@@ -997,7 +997,7 @@ int main(int argc, char **argv) {
if(freq >= netdata_update_every)
netdata_update_every = freq;
else if(freq)
- error("update frequency %d seconds is too small for XENSTAT. Using %d.", freq, netdata_update_every);
+ netdata_log_error("update frequency %d seconds is too small for XENSTAT. Using %d.", freq, netdata_update_every);
// ------------------------------------------------------------------------
// initialize xen API handles
@@ -1008,13 +1008,13 @@ int main(int argc, char **argv) {
if(unlikely(debug)) fprintf(stderr, "xenstat.plugin: calling xenstat_init()\n");
xhandle = xenstat_init();
if (xhandle == NULL) {
- error("XENSTAT: failed to initialize xenstat library.");
+ netdata_log_error("XENSTAT: failed to initialize xenstat library.");
return 1;
}
if(unlikely(debug)) fprintf(stderr, "xenstat.plugin: calling libxl_ctx_alloc()\n");
if (libxl_ctx_alloc(&ctx, LIBXL_VERSION, 0, NULL)) {
- error("XENSTAT: failed to initialize xl context.");
+ netdata_log_error("XENSTAT: failed to initialize xl context.");
xenstat_uninit(xhandle);
return 1;
}
@@ -1066,7 +1066,7 @@ int main(int argc, char **argv) {
libxl_ctx_free(ctx);
xenstat_uninit(xhandle);
- info("XENSTAT process exiting");
+ netdata_log_info("XENSTAT process exiting");
return 0;
}