Answer the question
In order to leave comments, you need to log in
How to properly filter such an element?
I use the PhpZabbixApi
library
In the API methods have a filter parameter .
Return only results that exactly match the specified filter.
Accepts an array where keys are property names and values, either a single value or an array of match values.
Doesn't work with text fields.
$maps = $api->mapGet(array(
'output' => array('sysmapid', 'name'),
'selectSelements' => array('elementid'),
'filter' => array('sysmapid' => '2')));
echo (serialize($maps));
array (
0 =>
stdClass::__set_state(array(
'sysmapid' => '2',
'name' => 'Local network',
'selements' =>
array (
0 =>
stdClass::__set_state(array(
'elementid' => '10017',
)),
1 =>
stdClass::__set_state(array(
'elementid' => '0',
)),
),
)),
)
$api->mapGet(array(
'output' => array('sysmapid', 'name'),
'selectSelements' => array('elementid'),
'filter' => array('elementid' => '10017')));
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