Ad Widget

Collapse

Does host.create allow the configuration of TLS as well?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Judge_Dredd
    Junior Member
    • Feb 2023
    • 17

    #1

    Does host.create allow the configuration of TLS as well?

    Hi all,

    I am on the last legs of automating the process of adding new hosts into Zabbix by way of PowerShell. The final hurdle I have is whether or not host.create allows the configuring of TLS. I have the following (some things changed) JSON request that is fired off to our Zabbix server and it does in fact create the Host. What it doesn't do is configure encryption. My question here is two fold 1) Can this actually be done? and 2) if it can be done does this request look correct? (ignore the formatting). No error occurs, it's as if the TLS parameters are ignored.

    {
    "method": "host.create",
    "params": {
    "host": "MYNEWSERVER",
    "groups": {
    "groupid": "35"
    },
    "templates": {
    "templateid": "10000"
    },
    "interfaces": {
    "tls_accept": 2,
    "type": 1,
    "useip": 1,
    "ip": "192.168.1.5",
    "tls_connect": 2,
    "port": 10050,
    "main": 1,
    "tls_psk_identity": "PSK 001",
    "tls_psk": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxx",
    "dns": "server.local"
    }
    },
    "id": 2,
    "jsonrpc": "2.0",
    "auth": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
    }​

    Thanks in advance

    Cheers
    Marc
  • Answer selected by tim.mooney at 23-02-2023, 00:42.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    Shouldn't those tls* parameters be outside of interface definition?
    Same level as host name etc...

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #2
      Shouldn't those tls* parameters be outside of interface definition?
      Same level as host name etc...

      Comment

      • Judge_Dredd
        Junior Member
        • Feb 2023
        • 17

        #3
        Thanks for the response - I'll give that a try and see how that goes. Cheers

        Comment

        • Judge_Dredd
          Junior Member
          • Feb 2023
          • 17

          #4
          Thanks Cyber, much appreciated, moving the tls parameters outside the interfaces definition worked as treat. Cheers

          Comment

          Working...