Ad Widget

Collapse

Zabbix is unable to check Veeam REST API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wowa
    Junior Member
    • Sep 2024
    • 1

    #1

    Zabbix is unable to check Veeam REST API

    I'm trying to set up "Veeam Backup and Replication by HTTP" in Zabbix 7.0+ and Veeam 12+ (Enterprise Plus, API included)
    1) I created a user in Veeam and entered the credentials and Veeam server address as required in the guide.
    I get an error when I try to test the template
    {"error":"Error: cannot get URL: Couldn't connect to server."}
    2) I found a similar topic on the forum and tried to execute the commands given in the topic to check the operability from the console of the Zabbix server itself (https://www.zabbix.com/forum//zabbix...veeam-rest-api)
    Code:
    HTML Code:
    curl -k -H 'x-api-version: 1.0-rev2'  'Content-Type: application/x-www-form-urlencoded' --data 'grant_type=password&username=veeamUserLogin&password=veeamUsrPass' 'https://ip_veeam:9419/api/oauth2/token'
    curl -k -H 'x-api-version: 1.0-rev2'  'Authorization: Bearer TOKEN_FROM_PREVIOUS_REQUEST' https://ip_veeam:9419/api/v1/jobs/states
    with key
    ----insecure
    or
    -k
    the request is executed and I get the token
    but without this key i get ​error:
    curl: (3) URL using bad/illegal format or missing URL
    curl: (60) SSL: certificate subject name 'Veeam Backup Server Certificate' does not match target host name '192.168.x.x'
    More details here: https://curl.se/docs/sslcerts.html

    curl failed to verify the legitimacy of the server and therefore could not
    establish a secure connection to it. To learn more about this situation and
    how to fix it, please visit the web page mentioned above.

    3) I tried to add the certificate to trusted, but the self-signed certificate does not match the internal IP address.
    Alternatively, I'm considering issuing a new certificate with an IP address for Veeam, but that may cause the backup to fail. Or set up monitoring via the https://github.com/romainsi/zabbix-VB-R-SQL template.
  • tompaah
    Junior Member
    • Jan 2025
    • 8

    #2
    Originally posted by Wowa
    I'm trying to set up "Veeam Backup and Replication by HTTP" in Zabbix 7.0+ and Veeam 12+ (Enterprise Plus, API included)
    Got the exact same problem - did you get this resolved?

    Works perfectly in my test environment that is a Zabbix Appliance.
    But in production, that is a Zabbix installed with packages on Rocky, it does not.

    From CLI it's able to connect to Veeam API with
    Code:
    curl -vk https://veeam-name:9419
    It's clearly visible from there the certificate is self-signed.

    But from the Zabbix check it just doesn't connect.
    I'd hope there yould be a "skip TLS verify" option somewhere. But where and why does it work out of the box on the appliance..?

    Comment

    • tompaah
      Junior Member
      • Jan 2025
      • 8

      #3
      Appears to be a problem created by SELinux.
      After setting the variable
      Code:
      sudo setsebool nis_enabled true
      the Veeam checks worked fine.

      Comment

      Working...