<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>logIt &#187; Zabbix</title>
	<atom:link href="https://lakm.us/logit/tag/zabbix/feed/" rel="self" type="application/rss+xml" />
	<link>https://lakm.us/logit</link>
	<description>Log Around The Clock</description>
	<lastBuildDate>Sat, 06 Jun 2015 14:17:37 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Zabbix Proxy: distributed NMS monitoring via embedded Linux (Ubuntu on BeagleBoard)</title>
		<link>https://lakm.us/logit/2012/07/zabbix-proxy-distributed-nms-monitoring-embedded-linux-ubuntu-beagleboard/</link>
		<comments>https://lakm.us/logit/2012/07/zabbix-proxy-distributed-nms-monitoring-embedded-linux-ubuntu-beagleboard/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 07:26:15 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[ARM Linux]]></category>
		<category><![CDATA[ARMv7]]></category>
		<category><![CDATA[BeagleBoard]]></category>
		<category><![CDATA[embedded system]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[Zabbix]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=404</guid>
		<description><![CDATA[As already mentioned in previous post&#8217;s introduction, proof of concept on how Zabbix Proxy works under unreliable communication is what this next post about. The idea is to have these scenarios tested: independent SNMP data polling by individual NMS proxy (embedded system) intermittent connection between main/master NMS server with its proxy Of course we&#8217;ll do [...]]]></description>
				<content:encoded><![CDATA[<p>As already mentioned in <a href="./2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/" title="Compile Zabbix Proxy in Ubuntu ARM (BeagleBoard)" target="_blank">previous post&#8217;s</a> introduction, proof of concept on how <a href="http://www.zabbix.com/documentation/1.8/manual/processes/zabbix_proxy" title="Zabbix Proxy" target="_blank">Zabbix Proxy</a> works under unreliable communication is what this next post about. The idea is to have these scenarios tested:</p>
<ol>
<li>independent SNMP data polling by individual NMS proxy (embedded system)</li>
<li>intermittent connection between main/master NMS server with its proxy</li>
</ol>
<p>Of course we&#8217;ll do them in implementation context of <a href="http://www.zabbix.com/documentation/1.8/manual/processes/zabbix_server" title="Zabbix Server" target="_blank">Zabbix Server</a> as main/master NMS server and our <a href="http://beagleboard.org/hardware-xM/" target="_blank">BeagleBoard xM</a> as its proxy.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="zabbix-proxy-routine-log-abstract-illustration.jpg" src="../../../../images/zabbix-proxy-routine-log-abstract-illustration.jpg" title="Zabbix Proxy - distributed NMS over embedded Linux" width="380" height="293" /><p class="wp-caption-text">Zabbix Proxy - distributed NMS over embedded Linux</p></div>
<p>In the technical details, I already followed pretty much the same steps showed in <a href="http://www.zabbix.com/wiki/howto/install/debian/zabbix_proxy_on_debian_sqlite" target="_blank">installation wiki</a> (with the exception that I didn&#8217;t put the process into startup <code>init.d</code> script as I would start it manually as needed).</p>
<p>The first test is to make our Ubuntu ARM board accepts configuration done in Zabbix Server web-GUI, retrieves SNMP data to it, and sends collected data to server. Mode passive is chosen so that the server will be the one initiating contact with the board. After enabling a certain SNMP host, i.e. <code>host-aaa</code>, as monitored-by-proxy, the Zabbix Server log will show:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">15677</span>:<span style="color: #000000;">20120601</span>:<span style="color: #000000;">022022.960</span> Sending configuration data to proxy <span style="color: #ff0000;">'beaglexm1'</span>. Datalen <span style="color: #000000;">9205</span></pre></div></div>

<p>Our board, &#8216;<code>beaglexm1</code>&#8216;, will start to poll SNMP data from <code>host-xxx</code> to then store it in designated <code>sqlite</code> database.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">975</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">212024.098</span> proxy <span style="color: #666666; font-style: italic;">#8 started [poller #5]</span>
<span style="color: #000000;">984</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">212024.128</span> proxy <span style="color: #666666; font-style: italic;">#17 started [discoverer #1]</span>
<span style="color: #000000;">968</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">212025.423</span> Received configuration data from server. Datalen <span style="color: #000000;">9205</span>
<span style="color: #000000;">971</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">212030.388</span> Enabling SNMP host <span style="color: #7a0874; font-weight: bold;">&#91;</span>host-aaa<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>From time to time as configured, our board will also run housekeeping to keep our board database file in small size.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">1081</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">224513.922</span> Executing housekeeper
<span style="color: #000000;">1081</span>:<span style="color: #000000;">20120531</span>:<span style="color: #000000;">224514.505</span> Deleted <span style="color: #000000;">4885</span> records from <span style="color: #7a0874; font-weight: bold;">history</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">0.453765</span> seconds<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></div></div>

<p>Under normal connection, in main Zabbix Server we&#8217;ll start seeing the collected data from <code>host-aaa</code> the same way as when the SNMP data is polled by the server directly. To emulate disruption to the connectivity, I choose to use simple <code>iptables</code> drop packet. This time the server will no longer seeing new data.</p>
<p>After the drop block is released, the server we&#8217;ll start seeing new data as well as data from the period of intermittent connection. It will take some time before all of that being sent to the server.</p>
<p>In general that proves it. I collected 44 OID values from the <code>host-aaa</code> every 30 seconds and in this case BeagleBoard utilization was very low as this wasn&#8217;t a stress test to see its performance. </p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2012/07/zabbix-proxy-distributed-nms-monitoring-embedded-linux-ubuntu-beagleboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile Zabbix Proxy in Ubuntu ARM (BeagleBoard)</title>
		<link>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/</link>
		<comments>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/#comments</comments>
		<pubDate>Tue, 17 Jul 2012 08:28:57 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[ARM Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ARMv7]]></category>
		<category><![CDATA[BeagleBoard]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[embedded system]]></category>
		<category><![CDATA[make-install]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[workaround]]></category>
		<category><![CDATA[Zabbix]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=401</guid>
		<description><![CDATA[I needed to tackle practical limitation of SNMP monitoring under unreliable communication, a serious consideration was made for Zabbix Proxy. It was an option said to be ready for embedded hardware. I already had BeagleBoard xM Rev C running Ubuntu 11.10 Oneiric and needed to proof that it would port functionally to this Linux ARM [...]]]></description>
				<content:encoded><![CDATA[<p>I needed to tackle practical limitation of SNMP monitoring under unreliable communication, a serious consideration was made for <a href="http://www.zabbix.com/documentation/1.8/manual/processes/zabbix_proxy" title="Zabbix Proxy" target="_blank">Zabbix Proxy</a>. It was an option said to be <a href="http://www.zabbix.com/documentation/1.8/manual/proxies/proxy_vs_node" title="Zabbix: Proxy vs Node" target="_blank">ready for embedded hardware</a>. I already had BeagleBoard xM Rev C running <a href="./2011/12/ubuntu-on-beagleboard-xm-with-easycap-video-capture-compiling-driver/" title="Ubuntu on Beagleboard xM" target="_blank">Ubuntu 11.10 Oneiric</a> and needed to proof that it would port functionally to this Linux ARM board. There existed <code>zabbix-proxy-mysql</code> in <a href="https://launchpad.net/ubuntu/oneiric/armel/zabbix-proxy-mysql/1:1.8.5-1ubuntu2" title="armel zabbix-proxy-mysql" target="_blank">Oneiric repository</a>, but <code><a href="http://www.sqlite.org/" title="SQLite" target="_blank">sqlite</a></code> seemed to be a better scale option for embedded deployment.</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="zabbix-proxy-abstract-illustration.png" src="../../../../images/zabbix-proxy-abstract-illustration.png" title="Zabbix Proxy Distributed NMS" width="330" height="253" /><p class="wp-caption-text">Zabbix Proxy Distributed NMS</p></div>
<p>An example set out for <a href="http://www.zabbix.com/wiki/howto/install/debian/zabbix_proxy_on_debian_sqlite" title="Wiki: Zabbix Proxy on Debian using sqlite" target="_blank">Zabbix Proxy on Debian</a> appears to be pretty straightforward to follow. With the ARM board already installed with <code>build-essential</code>, <code>snmp</code>, and <code>snmpd</code>, the following needs to be added:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libsnmp-dev libcurl4-openssl-dev fping curl sqlite libsqlite3-dev ntpdate</pre></div></div>

<p>then start the pre-compilation <code>configure</code> (in this case <a href="http://www.zabbix.com/rn1.8.7.php" title="Zabbix 1.8.7" target="_blank">Zabbix 1.8.7</a> is used):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> zabbix-1.8.7
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-proxy</span> <span style="color: #660033;">--enable-agent</span> <span style="color: #660033;">--with-sqlite3</span> <span style="color: #660033;">--with-net-snmp</span> <span style="color: #660033;">--with-libcurl</span></pre></div></div>

<p>It will go smooth. However, during <code>make</code> there are complains about undefined references to &#8216;<code>sqlite3_open</code>&#8216;, &#8216;<code>sqlite3_close</code>&#8216;, etc.:</p>
<p><span id="more-401"></span></p>

<div class="wp_syntax"><div class="code"><pre class="c" style="font-family:monospace;">..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_connect<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:331: undefined reference to `sqlite3_open'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">343</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_busy_timeout<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:334: undefined reference to `sqlite3_errmsg'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">335</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_close<span style="color: #ff0000;">'
../../src/libs/zbxdb/libzbxdb.a(db.o): In function `zbx_db_init'</span><span style="color: #339933;">:</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">385</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_open<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:387: undefined reference to `sqlite3_errmsg'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_close<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:446: undefined reference to `sqlite3_close'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_vexecute<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:827: undefined reference to `sqlite3_exec'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">852</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_changes<span style="color: #ff0000;">'
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:833: undefined reference to `sqlite3_free'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `SQ_DBfree_result<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:1363: undefined reference to `sqlite3_free_table'</span>
..<span style="color: #339933;">/</span>..<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>libzbxdb.<span style="color: #202020;">a</span><span style="color: #009900;">&#40;</span>db.<span style="color: #202020;">o</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> In <span style="color: #000000; font-weight: bold;">function</span> `zbx_db_vselect<span style="color: #ff0000;">':
/home/zabbix/zabbix-1.8.7/src/libs/zbxdb/db.c:1121: undefined reference to `sqlite3_get_table'</span>
<span style="color: #339933;">/</span>home<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">/</span>zabbix<span style="color: #339933;">-</span>1.8.7<span style="color: #339933;">/</span>src<span style="color: #339933;">/</span>libs<span style="color: #339933;">/</span>zbxdb<span style="color: #339933;">/</span>db.<span style="color: #202020;">c</span><span style="color: #339933;">:</span><span style="color: #0000dd;">1127</span><span style="color: #339933;">:</span> undefined reference to `sqlite3_free<span style="color: #ff0000;">'</span></pre></div></div>

<p>this is obviously from the database related code compilation. I run the <code>gcc</code> manually for the <code>db.c</code> file inside its directory by adding the flag &#8216;<code>-lsqlite3</code>&#8216; in the tail of &#8216;<code>../../src/libs/zbxdb/libzbxdb.a</code>&#8216; to make it work. Afterward by going to the initial directory first, running <code>make</code> again will then continue successfully.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> src<span style="color: #000000; font-weight: bold;">/</span>zabbix_proxy
$ <span style="color: #c20cb9; font-weight: bold;">gcc</span> -DZABBIX_DAEMON <span style="color: #660033;">-g</span> <span style="color: #660033;">-O2</span>     -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>arm-linux-gnueabi    -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>include -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5.12</span><span style="color: #000000; font-weight: bold;">/</span>CORE -I. -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include      -I<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>include <span style="color: #660033;">-lsqlite3</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>arm-linux-gnueabi <span style="color: #660033;">-lcurl</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">-lnetsnmp</span> <span style="color: #660033;">-lcrypto</span>  -L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #660033;">-lnetsnmp</span> <span style="color: #660033;">-lcrypto</span>   <span style="color: #660033;">-rdynamic</span>    <span style="color: #660033;">-o</span> zabbix_proxy zabbix_proxy-servercomms.o zabbix_proxy-events.o zabbix_proxy-zlog.o zabbix_proxy-proxy.o heart<span style="color: #000000; font-weight: bold;">/</span>libzbxheart.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>dbsyncer<span style="color: #000000; font-weight: bold;">/</span>libzbxdbsyncer.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>discoverer<span style="color: #000000; font-weight: bold;">/</span>libzbxdiscoverer.a housekeeper<span style="color: #000000; font-weight: bold;">/</span>libzbxhousekeeper.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>httppoller<span style="color: #000000; font-weight: bold;">/</span>libzbxhttppoller.a proxyconfig<span style="color: #000000; font-weight: bold;">/</span>libzbxproxyconfig.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>pinger<span style="color: #000000; font-weight: bold;">/</span>libzbxpinger.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>poller<span style="color: #000000; font-weight: bold;">/</span>libzbxpoller.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>trapper<span style="color: #000000; font-weight: bold;">/</span>libzbxtrapper.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>nodewatcher<span style="color: #000000; font-weight: bold;">/</span>libzbxnodewatcher.a datasender<span style="color: #000000; font-weight: bold;">/</span>libzbxdatasender.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>zabbix_server<span style="color: #000000; font-weight: bold;">/</span>selfmon<span style="color: #000000; font-weight: bold;">/</span>libzbxselfmon.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>libzbxserversysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>libspecsysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>common<span style="color: #000000; font-weight: bold;">/</span>libcommonsysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsysinfo<span style="color: #000000; font-weight: bold;">/</span>simple<span style="color: #000000; font-weight: bold;">/</span>libsimplesysinfo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxlog<span style="color: #000000; font-weight: bold;">/</span>libzbxlog.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdbcache<span style="color: #000000; font-weight: bold;">/</span>libzbxdbcache.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxmemory<span style="color: #000000; font-weight: bold;">/</span>libzbxmemory.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxalgo<span style="color: #000000; font-weight: bold;">/</span>libzbxalgo.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxnix<span style="color: #000000; font-weight: bold;">/</span>libzbxnix.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxsys<span style="color: #000000; font-weight: bold;">/</span>libzbxsys.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxconf<span style="color: #000000; font-weight: bold;">/</span>libzbxconf.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcommon<span style="color: #000000; font-weight: bold;">/</span>libzbxcommon.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcrypto<span style="color: #000000; font-weight: bold;">/</span>libzbxcrypto.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcomms<span style="color: #000000; font-weight: bold;">/</span>libzbxcomms.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxcommshigh<span style="color: #000000; font-weight: bold;">/</span>libzbxcommshigh.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxjson<span style="color: #000000; font-weight: bold;">/</span>libzbxjson.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxexec<span style="color: #000000; font-weight: bold;">/</span>libzbxexec.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxself<span style="color: #000000; font-weight: bold;">/</span>libzbxself.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxserver<span style="color: #000000; font-weight: bold;">/</span>libzbxserver.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxicmpping<span style="color: #000000; font-weight: bold;">/</span>libzbxicmpping.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdbhigh<span style="color: #000000; font-weight: bold;">/</span>libzbxdbhigh.a ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>libs<span style="color: #000000; font-weight: bold;">/</span>zbxdb<span style="color: #000000; font-weight: bold;">/</span>libzbxdb.a <span style="color: #660033;">-lsqlite3</span> <span style="color: #660033;">-lcurl</span>  <span style="color: #660033;">-lnetsnmp</span>    <span style="color: #660033;">-lm</span>  <span style="color: #660033;">-lresolv</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2012/07/compile-zabbix-proxy-ubuntu-arm-beagleboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acknowledging Event: Zabbix Python API</title>
		<link>https://lakm.us/logit/2012/05/acknowledging-event-zabbix-python-api/</link>
		<comments>https://lakm.us/logit/2012/05/acknowledging-event-zabbix-python-api/#comments</comments>
		<pubDate>Mon, 14 May 2012 02:40:43 +0000</pubDate>
		<dc:creator>Arif</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Zabbix]]></category>

		<guid isPermaLink="false">http://lakm.us/logit/?p=388</guid>
		<description><![CDATA[Acknowledgement is one of the things that is provided by Zabbix API in its event section. We can make use of the methods get() and acknowledge() to automatically acknowledge an event. Digging through the attributes of those methods, the official doc doesn&#8217;t provide complete example to follow. Added with some luck, my search get me [...]]]></description>
				<content:encoded><![CDATA[<p>Acknowledgement is one of the things that is provided by <a href="http://www.zabbix.com/" title="Zabbix" target="_blank">Zabbix</a> API in its <a href="http://www.zabbix.com/documentation/1.8/api/event" title="Zabbix API 1.8: Event" target="_blank">event section</a>. We can make use of the methods <code>get()</code> and <code>acknowledge()</code> to automatically acknowledge an event. Digging through the attributes of those methods, the official doc doesn&#8217;t provide complete example to follow. Added with some luck, my search get me to have the following JSON RPC that works in <a href="http://www.zabbix.com/rn1.8.7.php" title="Zabbix 1.8.7 Release Announcement" target="_blank">Zabbix 1.8.7</a> using <a href="https://github.com/gescheit/scripts" title="Gescheit github" target="_blank">Gescheit API implementation</a> written in Python. </p>
<p>When the goal is to acknowledge a specific event, the JSON call is however limited to some basic responses. It means that you can&#8217;t query a single RPC request for i.e. the following combination: <em>list of acknowledged events <strong>with</strong> &#8220;problem&#8221; status <strong>and</strong> trigger ID 500</em> (500 is merely an example).</p>
<p>However, combination in a single request do exist i.e. I&#8217;ve tried: <em>list of acknowledged events <strong>with</strong> &#8220;problem&#8221; status</em> as the following GET request:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
<span style="color: #3366CC;">&quot;params&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;acknowledged&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;value&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;jsonrpc&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;2.0&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;method&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;event.get&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;auth&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;some-hash-authentication&quot;</span><span style="color: #339933;">,</span>
<span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span> some<span style="color: #339933;">-</span>RPC<span style="color: #339933;">-</span>sequence<span style="color: #339933;">-</span>integer
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><em>(Note: <code>value=1</code> means status is &#8220;problem&#8221;)</em></p>
<p>For the basic example above, find the script in <a href="https://github.com/bandono/scripts" title="forked Gescheit API github" target="_blank">my fork</a> of Gescheit API.</p>
<p>Back to our goal of acknowledging events, our API can make the following RPCs:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">ack_list=zapi.<span style="color: black;">event</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: black;">&#123;</span><span style="color: #483d8b;">&quot;acknowledged&quot;</span>:<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>
problem_list=zapi.<span style="color: black;">event</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: black;">&#123;</span><span style="color: #483d8b;">&quot;value&quot;</span>:<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#125;</span><span style="color: black;">&#41;</span>
event_trigger_list=zapi.<span style="color: black;">event</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: black;">&#123;</span><span style="color: #483d8b;">&quot;triggerids&quot;</span>:<span style="color: black;">&#91;</span>trigger_id<span style="color: black;">&#93;</span><span style="color: black;">&#125;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Yes, they are three requests. We can then filter out a single event to be acknowledged by intersecting the three results. The first intersection is between <code>event_trigger_list</code>, <code>problem_list</code>, and <code>ack_list</code> as illustrated below:</p>
<div class="wp-caption aligncenter" style="width: 460px"><img alt="problem-list-acknowledgement-intersection.jpg" src="../../../../images/problem-list-acknowledgement-intersection.jpg" title="Intersection of problem list, event list with specific trigger ID, and acknowledged event list" width="309" height="211" /><p class="wp-caption-text">Intersection of problem list, event list with specific trigger ID, and acknowledged event list</p></div>
<p>After we opt-out those intersections, we can then get the event with problem status and choose the latest event only to be acknowledged. Check the code on <a href="https://github.com/bandono/zabbix-custom-integration/blob/master/bin/api/zabbix_event_ack.py" title="zabbix_event_ack.py" target="_blank">my github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://lakm.us/logit/2012/05/acknowledging-event-zabbix-python-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
