Error: Could not set 'present' on ensure: undefined local variable or method `proxy_mode' for #<Puppet::Type::Zabbix_proxy::ProviderRuby:0x00000003aa85b8> #334
So when running puppet agent --test on proxy machine it puts data to puppetdb.
And after that running puppet agent --test on zabbix server I receive:
Error: Could not set 'present' on ensure: undefined local variable or method proxy_mode' for #<Puppet::Type::Zabbix_proxy::ProviderRuby:0x000000042ef6b8> Error: Could not set 'present' on ensure: undefined local variable or methodproxy_mode' for #
Wrapped exception:
undefined local variable or method proxy_mode' for #<Puppet::Type::Zabbix_proxy::ProviderRuby:0x000000042ef6b8> Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_proxy[zabbix-proxy.domain.com]/ensure: change from absent to present failed: Could not set 'present' on ensure: undefined local variable or methodproxy_mode' for #
Error: Could not set 'present' on ensure: Server answer API error
{
"code": -32602,
"message": "Invalid params.",
"data": "Trigger has items from template \"Template App Zabbix Proxy\" that is not linked to host."
}
on request:
{
"method": "template.massAdd",
"params": {
"hosts": [
{
"hostid": null
}
],
"templates": [
{
"templateid": 10048
}
]
},
"id": 16118,
"jsonrpc": "2.0",
"auth": "57d3992bc5eb3cee2c0f46cdb9efff59"
}
Error: Could not set 'present' on ensure: Server answer API error
{
"code": -32602,
"message": "Invalid params.",
"data": "Trigger has items from template \"Template App Zabbix Proxy\" that is not linked to host."
}
on request:
{
"method": "template.massAdd",
"params": {
"hosts": [
{
"hostid": null
}
],
"templates": [
{
"templateid": 10048
}
]
},
"id": 16118,
"jsonrpc": "2.0",
"auth": "57d3992bc5eb3cee2c0f46cdb9efff59"
}
Wrapped exception:
Server answer API error
{
"code": -32602,
"message": "Invalid params.",
"data": "Trigger has items from template \"Template App Zabbix Proxy\" that is not linked to host."
}
on request:
{
"method": "template.massAdd",
"params": {
"hosts": [
{
"hostid": null
}
],
"templates": [
{
"templateid": 10048
}
]
},
"id": 16118,
"jsonrpc": "2.0",
"auth": "57d3992bc5eb3cee2c0f46cdb9efff59"
}
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_userparameters[zabbix-proxy.domain.com_zabbix-proxy_Zabbix_Proxy]/ensure: change from absent to present failed: Could not set 'present' on ensure: Server answer API error
{
"code": -32602,
"message": "Invalid params.",
"data": "Trigger has items from template \"Template App Zabbix Proxy\" that is not linked to host."
}
on request:
{
"method": "template.massAdd",
"params": {
"hosts": [
{
"hostid": null
}
],
"templates": [
{
"templateid": 10048
}
]
},
"id": 16118,
"jsonrpc": "2.0",
"auth": "57d3992bc5eb3cee2c0f46cdb9efff59"
}
Affected Puppet, Ruby, OS and module versions/distributions
I've created zabbix proxy with such hiera config: classes:
zabbix::proxy::manage_resources: true zabbix::mode: 1 zabbix::proxy::mode: 1 zabbix::proxy_mode: 1
so nothing special. Also creating zabbix server was no challenging: classes:
zabbix::manage_resources: true zabbix::web::manage_resources: true
So when running puppet agent --test on proxy machine it puts data to puppetdb. And after that running puppet agent --test on zabbix server I receive:
Error: Could not set 'present' on ensure: undefined local variable or method
Wrapped exception:
undefined local variable or method
Error: Could not set 'present' on ensure: Server answer API error
{
"code": -32602,
"message": "Invalid params.",
"data": "Trigger has items from template \"Template App Zabbix Proxy\" that is not linked to host."
}
on request:
{
"method": "template.massAdd",
"params": {
"hosts": [
{
"hostid": null
}
],
"templates": [
{
"templateid": 10048
}
]
},
"id": 16118,
"jsonrpc": "2.0",
"auth": "57d3992bc5eb3cee2c0f46cdb9efff59"
}
Error: Could not set 'present' on ensure: Server answer API error
{
"code": -32602,
"message": "Invalid params.",
"data": "Trigger has items from template \"Template App Zabbix Proxy\" that is not linked to host."
}
on request:
{
"method": "template.massAdd",
"params": {
"hosts": [
{
"hostid": null
}
],
"templates": [
{
"templateid": 10048
}
]
},
"id": 16118,
"jsonrpc": "2.0",
"auth": "57d3992bc5eb3cee2c0f46cdb9efff59"
}
Wrapped exception:
Server answer API error
{
"code": -32602,
"message": "Invalid params.",
"data": "Trigger has items from template \"Template App Zabbix Proxy\" that is not linked to host."
}
on request:
{
"method": "template.massAdd",
"params": {
"hosts": [
{
"hostid": null
}
],
"templates": [
{
"templateid": 10048
}
]
},
"id": 16118,
"jsonrpc": "2.0",
"auth": "57d3992bc5eb3cee2c0f46cdb9efff59"
}
Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_userparameters[zabbix-proxy.domain.com_zabbix-proxy_Zabbix_Proxy]/ensure: change from absent to present failed: Could not set 'present' on ensure: Server answer API error
{
"code": -32602,
"message": "Invalid params.",
"data": "Trigger has items from template \"Template App Zabbix Proxy\" that is not linked to host."
}
on request:
{
"method": "template.massAdd",
"params": {
"hosts": [
{
"hostid": null
}
],
"templates": [
{
"templateid": 10048
}
]
},
"id": 16118,
"jsonrpc": "2.0",
"auth": "57d3992bc5eb3cee2c0f46cdb9efff59"
}
proxy_mode' for #<Puppet::Type::Zabbix_proxy::ProviderRuby:0x000000042ef6b8> Error: Could not set 'present' on ensure: undefined local variable or method
proxy_mode' for #proxy_mode' for #<Puppet::Type::Zabbix_proxy::ProviderRuby:0x000000042ef6b8> Error: /Stage[main]/Zabbix::Resources::Web/Zabbix_proxy[zabbix-proxy.domain.com]/ensure: change from absent to present failed: Could not set 'present' on ensure: undefined local variable or method
proxy_mode' for #Can anybody give some hint what's wrong?
regards, p.