VeeamHub / grafana

Grafana dashboard for Veeam solutions
MIT License
59 stars 19 forks source link

not working / windows server with password have veeam / ubuntu have influxdb2.0 + grafana #23

Open johnfelipe opened 1 year ago

johnfelipe commented 1 year ago

steps:

wget https://raw.githubusercontent.com/VeeamHub/grafana/master/veeam-availability-console-grafana/veeam-availability-console-script.sh

nano
##
InfluxDBURL="172.19.44.255"
InfluxDBPort="8086" #Default Port
InfluxDB="veeatelegraf2022" #Default Database

# Endpoint URL for login action
Username="USER"
Password="felipe"
RestServer="https://172.19.32.91"
RestPort="1281" #Default Port

##
chmod +x veeam-availability-console-script.sh
./veeam-availability-console-script.sh

or

wget https://raw.githubusercontent.com/jorgedlcruz/veeam-availability-console-grafana/master/veeam-availability-console-script.sh

nano
##
InfluxDBURL="172.19.44.255"
InfluxDBPort="8086" #Default Port
InfluxDB="veeatelegraf2022" #Default Database
InfluxDBUser="administrator" #User for Database
InfluxDBPassword="i-7enJEhB_5oDLxYZHNaWgtUkQM_so9sAX84PNIaM78v0EhACz7LOEBwnkkMMRi-cbHrOBslv1ICJKx2YbHYJg==" #Password for Database

# Endpoint URL for login action
Username="USER"
Password="felipe"
RestServer="172.19.32.91"
RestPort="1281" #Default Port

##

chmod +x veeam-availability-console-script.sh
./veeam-availability-console-script.sh

with same issue

root@ubuntu20portatil:~# ./veeam-availability-console-script.sh
./veeam-availability-console-script.sh: line 35: jq: command not found
./veeam-availability-console-script.sh: line 44: jq: command not found
./veeam-availability-console-script.sh: line 162: jq: command not found
./veeam-availability-console-script.sh: line 163: jq: command not found
./veeam-availability-console-script.sh: line 164: jq: command not found
./veeam-availability-console-script.sh: line 165: jq: command not found
./veeam-availability-console-script.sh: line 166: jq: command not found
./veeam-availability-console-script.sh: line 167: jq: command not found
./veeam-availability-console-script.sh: line 169: jq: command not found
./veeam-availability-console-script.sh: line 171: jq: command not found
./veeam-availability-console-script.sh: line 172: jq: command not found
./veeam-availability-console-script.sh: line 173: jq: command not found
./veeam-availability-console-script.sh: line 174: jq: command not found
./veeam-availability-console-script.sh: line 175: jq: command not found
./veeam-availability-console-script.sh: line 176: jq: command not found
./veeam-availability-console-script.sh: line 177: jq: command not found
./veeam-availability-console-script.sh: line 178: jq: command not found
./veeam-availability-console-script.sh: line 179: jq: command not found
./veeam-availability-console-script.sh: line 180: jq: command not found
./veeam-availability-console-script.sh: line 181: jq: command not found
./veeam-availability-console-script.sh: line 182: jq: command not found
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.5.1
X-Platform-Error-Code: unauthorized
Date: Wed, 09 Nov 2022 20:37:25 GMT
Content-Length: 48

{"code":"unauthorized","message":"Unauthorized"}
nielsengelen commented 1 year ago

You are missing the jq package. You can download and install it from https://stedolan.github.io/jq/download/ or use apt-get install jq (normally).

johnfelipe commented 1 year ago
# Endpoint URL for login action
Username="USER"
Password="felipe"
RestServer="https://172.19.32.91"
RestPort="1281" #Default Port

Restport is 1281 or 9419 same like swagger:

SNAG-0045

and application with 1281 is blocked:

SNAG-0046

or where review if working

And ./veeam_enterprisemanager.sh

show this errors:

Writing veeam_em_overview to InfluxDB
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.5.1
X-Platform-Error-Code: invalid
Date: Thu, 10 Nov 2022 14:36:35 GMT
Content-Length: 295

{"code":"invalid","message":"unable to parse 'veeam_em_overview,host=172.19.32.91 veeamBackupServers=,veeamProxyServers=,veeamRepositoryServers=,veeamRunningJobs=,veeamScheduledJobs=,veeamSuccessfulVmLastestStates=,veeamWarningVmLastestStates=,veeamFailedVmLastestStates=': missing field value"}Writing veeam_em_overview_vms to InfluxDB
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.5.1
X-Platform-Error-Code: invalid
Date: Thu, 10 Nov 2022 14:36:35 GMT
Content-Length: 326

{"code":"invalid","message":"unable to parse 'veeam_em_overview_vms,host=172.19.32.91 veeamProtectedVms=,veeamBackedUpVms=,veeamReplicatedVms=,veeamRestorePoints=,veeamFullBackupPointsSize=,veeamIncrementalBackupPointsSize=,veeamReplicaRestorePointsSize=,veeamSourceVmsSize=,veeamSuccessBackupPercents=': missing field value"}Writing veeam_em_overview_jobs to InfluxDB
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.5.1
X-Platform-Error-Code: invalid
Date: Thu, 10 Nov 2022 14:36:35 GMT
Content-Length: 433

{"code":"invalid","message":"unable to parse 'veeam_em_overview_jobs,host=172.19.32.91,veeamMaxDurationBackupJobName=None,veeamMaxDurationReplicaJobName=None veeamRunningJobs=,veeamScheduledJobs=,veeamScheduledBackupJobs=,veeamScheduledReplicaJobs=,veeamTotalJobRuns=,veeamSuccessfulJobRuns=,veeamWarningsJobRuns=,veeamFailedJobRuns=,veeamMaxJobDuration=,veeamMaxBackupJobDuration=,veeamMaxReplicaJobDuration=': missing field value"}root@ubuntu20portatil:~#
nielsengelen commented 1 year ago

The enterprise manager script is used against the Enterprise Manager within VBR. The other is for the veeam service provider console.

Depending on what you are running, you need to use 1 of the 2 scripts to the API port as found in the documentation.

johnfelipe commented 1 year ago

can u guide me pls i have enterprise with 1500 instance but i want to have grafana, i have influxdb 2.x, but im lost, because all show me invalid, im using this one:

wget https://raw.githubusercontent.com/VeeamHub/grafana/master/veeam-enterprise_manager-grafana/veeam_enterprisemanager.sh

johnfelipe commented 1 year ago

help me for solve "Unauthorized"

https://drive.google.com/file/d/1nw91SYDGWu9IM_12Rkd94GX33W4HFKj1/view?usp=drivesdk

Pls view that video link and help me ASAP

nielsengelen commented 1 year ago

There is a blog on how to set it up available at https://jorgedelacruz.uk/2020/01/07/looking-for-the-perfect-dashboard-influxdb-telegraf-and-grafana-part-xix-monitoring-veeam-with-enterprise-manager-shell-script/.

Unauthorised means that the credentials used against the API are invalid and u need to correct them.

johnfelipe commented 1 year ago

SNAG-0048

is stock in this step

windows:

Linux:

pls guide me for solve this one issue

johnfelipe commented 1 year ago

i change default port with new one 9419

root@ubuntu20portatil:~# ./veeam_enterprisemanager.sh
Writing veeam_em_overview to InfluxDB
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.5.1
X-Platform-Error-Code: invalid
Date: Fri, 11 Nov 2022 19:11:31 GMT
Content-Length: 295

{"code":"invalid","message":"unable to parse 'veeam_em_overview,host=172.19.32.91 veeamBackupServers=,veeamProxyServers=,veeamRepositoryServers=,veeamRunningJobs=,veeamScheduledJobs=,veeamSuccessfulVmLastestStates=,veeamWarningVmLastestStates=,veeamFailedVmLastestStates=': missing field value"}Writing veeam_em_overview_vms to InfluxDB
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.5.1
X-Platform-Error-Code: invalid
Date: Fri, 11 Nov 2022 19:11:31 GMT
Content-Length: 326

{"code":"invalid","message":"unable to parse 'veeam_em_overview_vms,host=172.19.32.91 veeamProtectedVms=,veeamBackedUpVms=,veeamReplicatedVms=,veeamRestorePoints=,veeamFullBackupPointsSize=,veeamIncrementalBackupPointsSize=,veeamReplicaRestorePointsSize=,veeamSourceVmsSize=,veeamSuccessBackupPercents=': missing field value"}Writing veeam_em_overview_jobs to InfluxDB
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.5.1
X-Platform-Error-Code: invalid
Date: Fri, 11 Nov 2022 19:11:32 GMT
Content-Length: 433

{"code":"invalid","message":"unable to parse 'veeam_em_overview_jobs,host=172.19.32.91,veeamMaxDurationBackupJobName=None,veeamMaxDurationReplicaJobName=None veeamRunningJobs=,veeamScheduledJobs=,veeamScheduledBackupJobs=,veeamScheduledReplicaJobs=,veeamTotalJobRuns=,veeamSuccessfulJobRuns=,veeamWarningsJobRuns=,veeamFailedJobRuns=,veeamMaxJobDuration=,veeamMaxBackupJobDuration=,veeamMaxReplicaJobDuration=': missing field value"}
carceneaux commented 1 year ago

@johnfelipe Please ensure you're using the script with the correct Veeam API. The scripts are named accordingly to match the Veeam API it leverages. As such, the veeam_enterprisemanager.sh script is designed to work with the Veeam Backup Enterprise Manager API which has a default port of 9398.

There currently does not exist a grafana integration in this repository for the Veeam Backup & Replication API.

I hope this clears things up for you.

jorgedlcruz commented 1 year ago

Hello John, Please install Veeam Enterprise Manager first - https://helpcenter.veeam.com/docs/backup/em/installing_veeam_backup_em.html?ver=110 then add your Veeam Backup & Replication server to it, and once you have data and everything on the EM UI, try the script again.

Thanks

johnfelipe commented 1 year ago

Now is working, but i have this not collecting:

https://drive.google.com/file/d/17qUOnVkfueAw-buHtKurXO1vWqXqDsbG/view?usp=drivesdk

How can review that NO DATA items?

johnfelipe commented 1 year ago

https://drive.google.com/file/d/17qUOnVkfueAw-buHtKurXO1vWqXqDsbG/view?usp=drivesdk

why that ones not collecting?

nielsengelen commented 1 year ago

You can run the script manually via bash to see if there is any output. For further troubleshooting, you will have to manually work against the Enterprise Manager as this is what the script does. It just reads the data coming from it.

There could be multiple reasons why there is no data (no backup jobs, no runs in the last X hours, API issue) and it's impossible for us to just say this via a video or screenshot.

samumatic commented 1 year ago

I have the same issue #25 running the script against the Veeam Service Provider Console (formerly the Veeam Availability Console), but getting a HTTP/1.1 400 Bad Request. I am sure, i am not running the wrong script (like the enterprise-console script) or targeting the wrong API (im targeting the VSPC API v2).

Am i confusing something?

Gwen44-github commented 1 year ago

I have some metric not into grafana. When I launch the script (veeam_enterprisemanager.sh) I reveive 5 error : jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null)

Gwen44-github commented 1 year ago

Can you tell me if I have alone with this problem and how to modify this script?

LorenzzoBazzanella commented 1 year ago

Can you tell me if I have alone with this problem and how to modify this script?

Hello, I am also experiencing the same issue, along with the error below.

$ ./veeam_enterprisemanager.sh
Writing veeam_em_overview to InfluxDB HTTP/1.1 400 Bad Request Content-Type: application/json Request-Id: 99b68fa0-3b92-11ee-b81e-005056be56a1 X-Influxdb-Build: OSS X-Influxdb-Error: unable to parse 'veeam_em_overview,host=veeam-manager.ggdc.io veeamBackupServers=null,veeamProxyServers=null,veeamRepositoryServers=null,veeamRunningJobs=null,veeamScheduledJobs=null,veeamSuccessfulVmLastestStates=null,veeamWarningVmLastestStates=null,veeamFailedVmLastestStates=null': invalid number X-Influxdb-Version: 1.8.10 X-Request-Id: 99b68fa0-3b92-11ee-b81e-005056be56a1 Date: Tue, 15 Aug 2023 17:38:52 GMT Content-Length: 313

{"error":"unable to parse 'veeam_em_overview,host=veeam-manager.ggdc.io veeamBackupServers=null,veeamProxyServers=null,veeamRepositoryServers=null,veeamRunningJobs=null,veeamScheduledJobs=null,veeamSuccessfulVmLastestStates=null,veeamWarningVmLastestStates=null,veeamFailedVmLastestStates=null': invalid number"} Writing veeam_em_overview_vms to InfluxDB HTTP/1.1 400 Bad Request Content-Type: application/json Request-Id: 99cc321d-3b92-11ee-b81f-005056be56a1 X-Influxdb-Build: OSS X-Influxdb-Error: unable to parse 'veeam_em_overview_vms,host=veeam-manager.ggdc.io veeamProtectedVms=null,veeamBackedUpVms=null,veeamReplicatedVms=null,veeamRestorePoints=null,veeamFullBackupPointsSize=null,veeamIncrementalBackupPointsSize=null,veeamReplicaRestorePointsSize=null,veeamSourceVmsSize=null,veeamSuccessBackupPercents=null': invalid number X-Influxdb-Version: 1.8.10 X-Request-Id: 99cc321d-3b92-11ee-b81f-005056be56a1 Date: Tue, 15 Aug 2023 17:38:52 GMT Content-Length: 348

{"error":"unable to parse 'veeam_em_overview_vms,host=veeam-manager.ggdc.io veeamProtectedVms=null,veeamBackedUpVms=null,veeamReplicatedVms=null,veeamRestorePoints=null,veeamFullBackupPointsSize=null,veeamIncrementalBackupPointsSize=null,veeamReplicaRestorePointsSize=null,veeamSourceVmsSize=null,veeamSuccessBackupPercents=null': invalid number"} Writing veeam_em_overview_jobs to InfluxDB HTTP/1.1 400 Bad Request Content-Type: application/json Request-Id: 99e5a865-3b92-11ee-b820-005056be56a1 X-Influxdb-Build: OSS X-Influxdb-Error: unable to parse 'veeam_em_overview_jobs,host=veeam-manager.ggdc.io,veeamMaxDurationBackupJobName=null,veeamMaxDurationReplicaJobName=null veeamRunningJobs=null,veeamScheduledJobs=null,veeamScheduledBackupJobs=null,veeamScheduledReplicaJobs=null,veeamTotalJobRuns=null,veeamSuccessfulJobRuns=null,veeamWarningsJobRuns=null,veeamFailedJobRuns=null,veeamMaxJobDuration=null,veeamMaxBackupJobDuration=null,veeamMaxReplicaJobDuration=null': invalid number X-Influxdb-Version: 1.8.10 X-Request-Id: 99e5a865-3b92-11ee-b820-005056be56a1 Date: Tue, 15 Aug 2023 17:38:52 GMT Content-Length: 463

{"error":"unable to parse 'veeam_em_overview_jobs,host=veeam-manager.ggdc.io,veeamMaxDurationBackupJobName=null,veeamMaxDurationReplicaJobName=null veeamRunningJobs=null,veeamScheduledJobs=null,veeamScheduledBackupJobs=null,veeamScheduledReplicaJobs=null,veeamTotalJobRuns=null,veeamSuccessfulJobRuns=null,veeamWarningsJobRuns=null,veeamFailedJobRuns=null,veeamMaxJobDuration=null,veeamMaxBackupJobDuration=null,veeamMaxReplicaJobDuration=null': invalid number"} jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null) jq: error (at :1): Cannot iterate over null (null)