Skip to content

Instantly share code, notes, and snippets.

@okisanjp
Last active January 3, 2016 07:39
Show Gist options
  • Save okisanjp/8431277 to your computer and use it in GitHub Desktop.
Save okisanjp/8431277 to your computer and use it in GitHub Desktop.
zabbixagent:rootで動かす設定を入れ忘れちゃった環境で、AllowRoot設定などを入れて再起動するワンライナー。設定部分は適宜調整。
ZAB_SERVER="ZABBIX_SERVER_FQDN" && echo -e "Server=$ZAB_SERVER\nServerActive=$ZAB_SERVER\nHostnameItem=system.hostname\nInclude=/etc/zabbix/zabbix_agentd.d/\nEnableRemoteCommands=1\nLogRemoteCommands=1\nAllowRoot=1\nLogFile=/var/log/zabbix/zabbix_agentd.log\nLogFileSize=0\nTimeout=30\n" > /etc/zabbix/zabbix_agentd.conf && /etc/init.d/zabbix-agent restart && /sbin/chkconfig zabbix-agent on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment