Package: vac-exporter
# vac_exporterVeeam VAC Exporter for Prometheus.Get VAC Tenant information:* Tenant Backuped VMs* Tenant Replicated VMs* Tenant Backed up to Cloud VMs* Tenant Storage Quota* Tenant VMs Quota* Tenant Traffic Quota* Tenant Used Storage* Tenant Used Traffic* Tenant jobs Processing Rate* Tenant jobs Transferred Data* Tenant jobs Protected VM count## InstallYou can do the following to run this exporter:* Install locally```$> python setup.py install$> vac_exporter -c /path/to/your/config```* Run via Docker container```docker run -it --rm  -p 9273:9273 -e VAC_USER=${VAC_USERNAME} -e VAC_PASSWORD=${VAC_PASSWORD} -e VAC_IGNORE_SSL=True --name vac_exporter registry.gitlab.com/frenchtoasters/vac_exporter:latest```## ConfigurationYou should only provide a configuration file if the environment variables are not going to be set. If you are going to use a configuration file for your container you will have to edit the container ENTRYPOINT like so:```ENTRYPOINT ["/usr/local/bin/vac_exporter","-c","/path/to/your/config"]```The following is what an example configuration file would look like, note that you can have multiple sections for different VAC hosts:```default:vac_user: "user"vac_password: "password"ignore_ssl: False```### Environment Variables| Variable       | Precedence             | Defaults | Description                                       ||----------------|------------------------|----------|---------------------------------------------------|| VAC_HOST       | config, env, get_param | n/a      | vac server to connect to                          || VAC_USER       | config, env            | n/a      | User for connecting to vac                        || VAC_PASSWORD   | config, env            | n/a      | Password for connecting to vac                    || VAC_IGNORE_SSL | config, env            | False    | Ignore the ssl cert on the connection to vac host |### Prometheus configurationThe following the base Prometheus configuration file.```- job_name: 'veeam_vac'metrics_path: '/metrics'static_configs:- targets:- 'veeam.company.com'relabel_configs:- source_labels: [__address__]target_label: __param_target- source_labels: [__param_target]target_label: instance- target_label: __address__replacement: localhost:9273# Example of Multiple VAC's usage- job_name: vac_exportmetrics_path: /metricsstatic_configs:- targets:- vac01- 'vac02.example.org'- "vac03.com"relabel_configs:- source_labels: [__address__]target_label: __param_target- source_labels: [__param_target]target_label: instance- target_label: __address__replacement: exporter_ip:9273```# Example Output***Thanks to a certian Lobster***`:9273/vac````$> curl 127.0.0.1:9273/vac# HELP teant_vms_backedup Number of protected vms of tenant# TYPE teant_vms_backedup gaugeteant_vms_backedup{tenant_id="Tenant1",tenant_name="2"} 0.0teant_vms_backedup{tenant_id="homelab",tenant_name="4"} 45.0# HELP tenant_vms_replicated Number of replicated vms of tenant# TYPE tenant_vms_replicated gaugetenant_vms_replicated{tenant_id="Tenant1",tenant_name="2"} 0.0tenant_vms_replicated{tenant_id="homelab",tenant_name="4"} 0.0# HELP tenant_vms_backed_cloud Number of tenat vms backed up to cloud# TYPE tenant_vms_backed_cloud gaugetenant_vms_backed_cloud{tenant_id="Tenant1",tenat_name="2"} 0.0tenant_vms_backed_cloud{tenant_id="homelab",tenat_name="4"} 3.0# HELP job_processing_rate Rate of job processing# TYPE job_processing_rate gaugejob_processing_rate{job_id="1",job_name="SQL_To_CloudConnect",tenant_id="4",units="B/s"} 0.0job_processing_rate{job_id="2",job_name="vcd",tenant_id="4",units="MB/s"} 31.47job_processing_rate{job_id="3",job_name="domain-controllers",tenant_id="4",units="MB/s"} 33.6job_processing_rate{job_id="4",job_name="veeam",tenant_id="4",units="MB/s"} 28.93job_processing_rate{job_id="5",job_name="veeam-sp",tenant_id="4",units="MB/s"} 33.66job_processing_rate{job_id="6",job_name="Testing",tenant_id="4",units="MB/s"} 52.54job_processing_rate{job_id="7",job_name="mail",tenant_id="4",units="MB/s"} 5.89job_processing_rate{job_id="8",job_name="vmware",tenant_id="4",units="MB/s"} 56.54job_processing_rate{job_id="9",job_name="centos_no_connectivity_restore",tenant_id="4",units="B/s"} 0.0job_processing_rate{job_id="10",job_name="plex",tenant_id="4",units="MB/s"} 38.63job_processing_rate{job_id="11",job_name="templates",tenant_id="4",units="B/s"} 0.0job_processing_rate{job_id="12",job_name="sql_aap",tenant_id="4",units="MB/s"} 33.83job_processing_rate{job_id="13",job_name="ccr-seed",tenant_id="4",units="MB/s"} 99.06job_processing_rate{job_id="14",job_name="test_vcd_test",tenant_id="4",units="MB/s"} 46.5job_processing_rate{job_id="2",job_name="Backup_Copy_Test",tenant_id="4",units="B/s"} 0.0job_processing_rate{job_id="3",job_name="Backup_Copy_Test_3",tenant_id="4",units="B/s"} 0.0job_processing_rate{job_id="4",job_name="TinyVM and CentOS SYN full",tenant_id="4",units="B/s"} 0.0job_processing_rate{job_id="5",job_name="test_to_ds_clone1",tenant_id="4",units="B/s"} 0.0job_processing_rate{job_id="15",job_name="SureBackup Job 1",tenant_id="4",units="B/s"} 0.0# HELP job_transfer_data Amount of data transferred in job# TYPE job_transfer_data gaugejob_transfer_data{job_id="1",job_name="SQL_To_CloudConnect",tenant_id="4",units="B"} 0.0job_transfer_data{job_id="2",job_name="vcd",tenant_id="4",units="MB"} 66.24job_transfer_data{job_id="3",job_name="domain-controllers",tenant_id="4",units="MB"} 176.18job_transfer_data{job_id="4",job_name="veeam",tenant_id="4",units="GB"} 3.2job_transfer_data{job_id="5",job_name="veeam-sp",tenant_id="4",units="MB"} 880.77job_transfer_data{job_id="6",job_name="Testing",tenant_id="4",units="GB"} 11.8job_transfer_data{job_id="7",job_name="mail",tenant_id="4",units="MB"} 197.03job_transfer_data{job_id="8",job_name="vmware",tenant_id="4",units="MB"} 805.33job_transfer_data{job_id="9",job_name="centos_no_connectivity_restore",tenant_id="4",units="B"} 32.0job_transfer_data{job_id="10",job_name="plex",tenant_id="4",units="MB"} 477.45job_transfer_data{job_id="11",job_name="templates",tenant_id="4",units="B"} 0.0job_transfer_data{job_id="12",job_name="sql_aap",tenant_id="4",units="GB"} 10.97job_transfer_data{job_id="13",job_name="ccr-seed",tenant_id="4",units="GB"} 1.12job_transfer_data{job_id="14",job_name="test_vcd_test",tenant_id="4",units="GB"} 16.28job_transfer_data{job_id="2",job_name="Backup_Copy_Test",tenant_id="4",units="B"} 0.0job_transfer_data{job_id="3",job_name="Backup_Copy_Test_3",tenant_id="4",units="B"} 0.0job_transfer_data{job_id="4",job_name="TinyVM and CentOS SYN full",tenant_id="4",units="B"} 64.0job_transfer_data{job_id="5",job_name="test_to_ds_clone1",tenant_id="4",units="B"} 0.0job_transfer_data{job_id="15",job_name="SureBackup Job 1",tenant_id="4",units="B"} 0.0# HELP job_protected_vms Protected vms in job# TYPE job_protected_vms gaugejob_protected_vms{job_id="1",job_name="SQL_To_CloudConnect",tenant_id="4"} 1.0job_protected_vms{job_id="2",job_name="vcd",tenant_id="4"} 1.0job_protected_vms{job_id="3",job_name="domain-controllers",tenant_id="4"} 1.0job_protected_vms{job_id="4",job_name="veeam",tenant_id="4"} 8.0job_protected_vms{job_id="5",job_name="veeam-sp",tenant_id="4"} 2.0job_protected_vms{job_id="6",job_name="Testing",tenant_id="4"} 17.0job_protected_vms{job_id="7",job_name="mail",tenant_id="4"} 1.0job_protected_vms{job_id="8",job_name="vmware",tenant_id="4"} 3.0job_protected_vms{job_id="9",job_name="centos_no_connectivity_restore",tenant_id="4"} 1.0job_protected_vms{job_id="10",job_name="plex",tenant_id="4"} 1.0job_protected_vms{job_id="11",job_name="templates",tenant_id="4"} 6.0job_protected_vms{job_id="12",job_name="sql_aap",tenant_id="4"} 1.0job_protected_vms{job_id="13",job_name="ccr-seed",tenant_id="4"} 1.0job_protected_vms{job_id="14",job_name="test_vcd_test",tenant_id="4"} 3.0job_protected_vms{job_id="2",job_name="Backup_Copy_Test",tenant_id="4"} 1.0job_protected_vms{job_id="3",job_name="Backup_Copy_Test_3",tenant_id="4"} 1.0job_protected_vms{job_id="4",job_name="TinyVM and CentOS SYN full",tenant_id="4"} 2.0job_protected_vms{job_id="5",job_name="test_to_ds_clone1",tenant_id="4"} 0.0job_protected_vms{job_id="15",job_name="SureBackup Job 1",tenant_id="4"} 0.0# HELP resources_storage_quota Storage quota for tenant resources# TYPE resources_storage_quota gaugeresources_storage_quota{resource_id="1",tenant_id="2",tenant_name="Tenant1",units="GB"} 500.0# HELP resources_vms_quota VM quota for tenant resources# TYPE resources_vms_quota gaugeresources_vms_quota{resource_id="1",tenant_id="2",tenant_name="Tenant1"} 0.0# HELP resources_traffic_quota Network traffic quota for tenant resources# TYPE resources_traffic_quota gaugeresources_traffic_quota{resource_id="1",tenant_id="2",tenant_name="Tenant1",units="GB"} 0.0# HELP resources_used_storage Used storage for tenant resources# TYPE resources_used_storage gaugeresources_used_storage{resource_id="1",tenant_id="2",tenant_name="Tenant1",units="GB"} 142.6# HELP resources_used_traffic Used network traffic for tenant resources# TYPE resources_used_traffic gaugeresources_used_traffic{resource_id="1",tenant_id="2",tenant_name="Tenant1",units="MB"} 18.5````:9273/metrics````$> curl 127.0.0.1:9273/metrics# HELP process_virtual_memory_bytes Virtual memory size in bytes.# TYPE process_virtual_memory_bytes gaugeprocess_virtual_memory_bytes 96972800.0# HELP process_resident_memory_bytes Resident memory size in bytes.# TYPE process_resident_memory_bytes gaugeprocess_resident_memory_bytes 25964544.0# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.# TYPE process_start_time_seconds gaugeprocess_start_time_seconds 1549495918.93# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.# TYPE process_cpu_seconds_total counterprocess_cpu_seconds_total 0.21000000000000002# HELP process_open_fds Number of open file descriptors.# TYPE process_open_fds gaugeprocess_open_fds 6.0# HELP process_max_fds Maximum number of open file descriptors.# TYPE process_max_fds gaugeprocess_max_fds 1048576.0# HELP vac_collection_duration_seconds Duration of collections by the VAC exporter# TYPE vac_collection_duration_seconds summary# HELP vac_request_errors_total Errors in requests to VAC exporter# TYPE vac_request_errors_total counter````:9273/healthz````$> curl 127.0.0.1:9273/healthzOK````:9273/````$> curl 127.0.0.1:9273/VAC ExporterVisit /vac?target=1.2.3.4 to use.```