[ZBX-23334] 403 error when using Veeam Backup Enterprise Manager by HTTP with v12 Created: 2023 Aug 30  Updated: 2024 Apr 03  Resolved: 2023 Nov 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Mike Ely Assignee: Zabbix Integration Team
Resolution: Declined Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Steps to reproduce:

  1. Configure template per instructions, get 401 error
  2. Use another tool to verify credentials are correct
  3. Verify using that other tool that api/reports/summary and all subsequent links work

Result:

Request failed with status code 403: {"FirstChanceExceptionMessage":null,"StackTrace":null,"Message":"Access denied.","StatusCode":403,"Status":"Forbidden"}.

Trace logs on the Veeam server say:

[29.08.2023 17:48:21.120] <44> Info         User [HOST\user] was successfully logged on.
[29.08.2023 17:48:21.124] <44> Info         [GET] request to [https://hostt:9398/api/backupFiles] deserialized. Message: [null]; Parameters: [].
[29.08.2023 17:48:21.125] <44> Error        Failed to get backup file references.. RequestUri: [URI template match was not found].
[29.08.2023 17:48:21.125] <44> Error        Access denied. (System.UnauthorizedAccessException)
[29.08.2023 17:48:21.125] <44> Error           at Veeam.Backup.Enterprise.RestAPIService.CRestrictedRestSession.get_BackupFilesScope()
[29.08.2023 17:48:21.125] <44> Error           at Veeam.Backup.Enterprise.RestAPIService.CRestBackupFilesControllerStub.<GetBackupFilesRefs>d__0.MoveNext()

Expected:
Data is gathered from Veeam Enterprise Manager



 Comments   
Comment by Alexey Pustovalov [ 2023 Aug 31 ]

Could you check access using the following request from Zabbix server / proxy side:

curl -vv --cookie-jar cookies.txt -X POST -k -v --header "Accept: application/json" -u "login:password" 'https://<server>:9398/api/sessionMngr'

then

curl -vv --location --header 'X-RestSvcSessionId: <token from previous response>' --request GET 'https://hostt:9398/api/backupFiles' 

and

curl -vv --location -b cookies.txt --request GET 'https://hostt:9398/api/backupFiles' 
Comment by Mike Ely [ 2023 Sep 14 ]

Sorry, this issue fell off my task list. I'm unable to get past the initial auth step to get a session ID:

curl -vv --cookie-jar cookies.txt -X POST -k -v --header "Accept: application/json" -u "HOSTNAME\zabbixuser" 'https://hostname.example:9398/api/sessionMngr'
Enter host password for user 'HOSTNAME\zabbixuser':
*   Trying [hostip]:9398...
* Connected to hostname.example ([hostip]) port 9398 (#0)
...ssl stuff elided, nothing there seems amiss...
< HTTP/2 411 
< content-type: text/html; charset=us-ascii
< date: Thu, 14 Sep 2023 19:31:34 GMT
< content-length: 344
< 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>
* Connection #0 to host hostname.example left intact 
Comment by Mike Ely [ 2023 Sep 14 ]

Once I add --header "Content-Length: 0" to the login request I do get a SessionId value, but trying to use it fails (piped output to jq for readability):

{
  "FirstChanceExceptionMessage": null,
  "StackTrace": null,
  "Message": "Identity was not authenticated.",
  "StatusCode": 401,
  "Status": "Unauthorized"
} 
Comment by Guillaume Lannes-Lacrouts [ 2023 Oct 04 ]

Hello, 

I have commented the line  in get metrics script and it's solved.

// espace réservé du code
getMetricsData: function() {
        var data = {};
        endpoints = {
            //'backupFiles': 'api/backupFiles',
        }; 

When i use the web api, i can't connect to the backupFiles. 

It's related to veeam BR ? 

Comment by Guillaume Lannes-Lacrouts [ 2023 Oct 13 ]

Hello,

I have an answer from Veeam Support. You must have Enterprise Plus licence to have an entire functional RestAPI.

Best regards

Comment by Alexey Pustovalov [ 2023 Nov 17 ]

Yes, we have documented such behaviour: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/veeam/enterprise_manager_http/README.md

Comment by Leandro Monasterio [ 2023 Dec 07 ]

Hello! I have this problem with Veeam Backup Enterprise Manager Template:

{"error":"Error: cannot get URL: Timeout was reached."}

I can access the Manager Console, so that is working fine...

Can yo help me please?

Zabbix 6.0 + Veeam Backup Enterprise Manager 12

 

Comment by Joakim Kingstrom [ 2024 Mar 26 ]

I'm having the same problem as leandromonasterio and I'm also using Zabbix 6.0 with Veeam Backup Enterprise Manager 12. I also have a Veeam Enterprise Plus license and I still receive the same error message as Leandro. 

Comment by Alexandre Lorne [ 2024 Apr 03 ]

Hello, actually i had the same error..

Zabbix 6.4 + Veeam Backup Enterprise Manager 12

Generated at Wed Apr 02 19:53:45 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.