net-mgmt/zabbix-agent: improved/fixed service controls; closes #551

This commit is contained in:
Franco Fichtner 2018-03-26 06:33:26 +00:00
parent f396f2b8a2
commit d2a898880f
4 changed files with 13 additions and 15 deletions

View file

@ -1,7 +1,8 @@
PLUGIN_NAME= zabbix-agent
PLUGIN_VERSION= 1.2
PLUGIN_COMMENT= Enterprise-class open source distributed monitoring agent
PLUGIN_DEPENDS= zabbix34-agent
PLUGIN_MAINTAINER= opnsense@moov.de
PLUGIN_NAME= zabbix-agent
PLUGIN_VERSION= 1.2
PLUGIN_REVISION= 1
PLUGIN_COMMENT= Enterprise-class open source distributed monitoring agent
PLUGIN_DEPENDS= zabbix34-agent
PLUGIN_MAINTAINER= opnsense@moov.de
.include "../../Mk/plugins.mk"

View file

@ -61,9 +61,9 @@ function zabbixagent_services()
'description' => gettext('Zabbix Agent'),
'pidfile' => '/var/run/zabbix/zabbix_agentd.pid',
'configd' => array(
'restart' => array('zabbix_agentd restart'),
'start' => array('zabbix_agentd start'),
'stop' => array('zabbix_agentd stop'),
'restart' => array('zabbixagent restart'),
'start' => array('zabbixagent start'),
'stop' => array('zabbixagent stop'),
),
'name' => 'zabbix_agentd',
);

View file

@ -33,10 +33,7 @@ $( document ).ready(function() {
mapDataToFormUI(data_get_map).done(function(){
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
// request service status on load and update status box
ajaxCall(url="/api/zabbixagent/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
updateServiceControlUI('zabbixagent');
});
/***********************************************************************
@ -67,9 +64,7 @@ $( document ).ready(function() {
draggable: true
});
} else {
ajaxCall(url="/api/zabbixagent/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
updateServiceControlUI('zabbixagent');
}
});
});

View file

@ -3,4 +3,6 @@
$logfile = '/var/log/zabbix/zabbix_agentd.log';
$logclog = false;
$service_hook = 'zabbix_agentd';
require_once 'diag_logs_template.inc';