Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zabbix_item_trapper is failing with: Error: -32602 (Invalid params.): Invalid parameter "/1": unexpected parameter "data_type". #32

Open
hongyecc opened this issue Jun 26, 2023 · 3 comments

Comments

@hongyecc
Copy link

hongyecc commented Jun 26, 2023

I am trying to use this provider to create zabbix trapper item with zabbix server 6.4.3 (api version is also 6.4.3) but getting:

│ Error: -32602 (Invalid params.): Invalid parameter "/1": unexpected parameter "data_type".
│
│   with zabbix_item_trapper.zabbix["running-process-count"],
│   on main.tf line 75, in resource "zabbix_item_trapper" "zabbix":
│   75: resource "zabbix_item_trapper" "zabbix" {

My terraform plan output looks like this:

  # zabbix_item_trapper.zabbix["running-process-count"] will be created
  + resource "zabbix_item_trapper" "zabbix" {
      + history   = "7d"
      + hostid    = "10792"
      + id        = (known after apply)
      + key       = "running-process-count"
      + name      = "running-process-count"
      + trends    = "365d"
      + valuetype = "unsigned"
    }

My terraform version:

terraform version
Terraform v1.5.0
on darwin_arm64
+ provider registry.terraform.io/hashicorp/null v3.2.1
+ provider registry.terraform.io/tpretz/zabbix v0.17.0

Any idea what is going on?

@DevOpsFu
Copy link

It looks like the data_type field was removed from the item object API way back in the upgrade from version 3.2 to 3.4. It's listed as a "Backward incompatible change" here:

https://www.zabbix.com/documentation/3.4/en/manual/api/changes_3.2_-_3.4

Fixing this will be a case of dealing with it in the go-zabbix-api package. I'm really surprised this hasn't been noticed sooner, given that this API change was released 7 years ago!

@johnnytan2885
Copy link

Is this issue still persists? It's also happening when I'm trying to create zabbix_item_simple

@DevOpsFu
Copy link

DevOpsFu commented Oct 3, 2024

Is this issue still persists? It's also happening when I'm trying to create zabbix_item_simple

Unfortunately yes. I ended up fixing the provider and client library myself and building it locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants