Answer the question
In order to leave comments, you need to log in
Zabbix api host.create?
The following situation when trying to create a host:
Request:
$json = {
jsonrpc => '2.0',
method => 'host.create',
params => {
host => 'test_from_api',
output => 'extend',
interfaces => {
dns => '',
hostid => '25',
ip => '127.0.0.1',
main => '1',
port => '10050',
type => '1',
useip => '1' ,
},
groups => {
groupid => '6',
},
},
auth => "$authID",
id => '21',
};
Answer:
'version' => 0,
'hostids' => [
'32'
]
}
},
'jsontext' => '{"jsonrpc":"2.0","result":{"hostids":["32"]},"id":"21 »}',
'is_success' => 1
}, 'JSON::RPC::ReturnObject' );
The host type was successfully created, I go to the web face - yes, the host is there
when the groupid in the request is changed to a two-digit one:
for example
groupid => '24',
Answer:
=pod
A lot of beeches
=cut
"code": -32500,"message": "Application error.","data":"No permissions to referred object or it does not exist!
Who faced? How is it treated? What is the problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question