-
New Feature Request
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
None
Hello Zabbix Team,
we need to run 'check now' function from dashboard without to find it over hosts. Is possible to add it to mainstream? We need it mainly at Problems widget.
I made some workaround and i paste it here how badly i did it. But it's working.
From dashboard i'm going to URL: https://.../zabbix/check_now.php?itemid=$itemid&form=update&filter_set=1
Icon with URL i added to: include/classes/screens/CScreenProblem.php
$hint_table->addRow([
new CCol($item['name_expanded']),
new CCol(zbx_date2str(DATE_TIME_FORMAT_SECONDS, $last_value['clock'])),
new CCol($last_value['value']),
new CCol(new CLink(new CImg('imgstore.php?iconid=188', 'no image', null, 15, 15), (new CUrl('check_now.php'))
->setArgument('itemid', $itemid)
->setArgument('form', 'update')
->setArgument('filter_set', '1')
->getUrl()
)
),
new CCol(($item['value_type'] == ITEM_VALUE_TYPE_FLOAT || $item['value_type'] == ITEM_VALUE_TYPE_UINT64)
? new CLink(_('Graph'), (new CUrl('history.php'))
->setArgument('action', HISTORY_GRAPH)
->setArgument('itemids[]', $itemid)
->getUrl()
)
: new CLink(_('History'), (new CUrl('history.php'))
->setArgument('action', HISTORY_VALUES)
->setArgument('itemids[]', $itemid)
->getUrl()
)
)
]);
And check_now.php from root dir is edited items.php file:
$subfiltersList = ['subfilter_apps', 'subfilter_types', 'subfilter_value_types', 'subfilter_status',
'subfilter_state', 'subfilter_templated_items', 'subfilter_with_triggers', 'subfilter_hosts', 'subfilter_interval',
'subfilter_history', 'subfilter_trends', 'subfilter_discovery'
];/*
- Permissions
*/
$itemId = getRequest('itemid');
if ($itemId)Unknown macro: { $result = (bool) API}require_once dirname(_FILE_).'/include/page_footer.php';
It's working over second page (check_now.php). It will be better to show only recheck icon near Last value, and if i click it, it will send request from dashboard directly (without going to next page to trigger it).
Thank you for response.