3c3 < PortSystem 1.0 --- > PortSystem 1.0 5,38c5,38 < name zabbix < version 1.8.2 < categories net < maintainers markd openmaintainer < platforms darwin < < description An open source application and network monitor < < long_description ${description} < < homepage http://www.zabbix.com/ < master_sites sourceforge < checksums md5 fa4be4fa7ac20a33cc0aa5c27b827746 < patchfiles patch-src-zabbix_server-poller-checks_snmp.c.diff < depends_lib port:fping \ < port:curl \ < port:openssl < < configure.args --enable-server \ < --enable-agent \ < --with-net-snmp \ < --bindir=${prefix}/bin/zabbix \ < --sbindir=${prefix}/sbin/zabbix \ < --libexecdir=${prefix}/libexec/zabbix \ < --datadir=${prefix}/share/zabbix \ < --sysconfdir=${prefix}/etc/zabbix \ < --localstatedir=${prefix}/var/zabbix < < configure.ldflags-append -lresolv < < if { [variant_isset agent_only] } { < startupitem.create yes < startupitem.start "${prefix}/share/zabbix/zabbix_agentd.init start" < startupitem.stop "${prefix}/share/zabbix/zabbix_agentd.init stop" --- > name zabbix > version 1.8.6 > categories net > maintainers markd openmaintainer > platforms darwin > > description An open source application and network monitor (Server or proxy module) > > long_description ${description} > > homepage http://www.zabbix.com/ > master_sites sourceforge > checksums md5 4642fd263167211a73a02fe7f3bcd998 > patchfiles patch-src-zabbix_server-poller-checks_snmp.c.diff > depends_lib port:fping \ > port:curl \ > port:openssl > > configure.args --enable-server \ > --with-net-snmp \ > --bindir=${prefix}/bin/zabbix \ > --sbindir=${prefix}/sbin/zabbix \ > --libexecdir=${prefix}/libexec/zabbix \ > --datadir=${prefix}/share/zabbix \ > --sysconfdir=${prefix}/etc/zabbix \ > --localstatedir=${prefix}/var/zabbix > > configure.ldflags-append -lresolv > > if { [variant_isset proxy] } { > startupitem.create yes > startupitem.name zabbix_proxy > startupitem.start "${prefix}/share/zabbix/zabbix_proxy.init start" > startupitem.stop "${prefix}/share/zabbix/zabbix_proxy.init stop" 40,42c40,43 < startupitem.create yes < startupitem.start "${prefix}/share/zabbix/zabbix_server.init start" < startupitem.stop "${prefix}/share/zabbix/zabbix_server.init stop" --- > startupitem.create yes > startupitem.name zabbix_server > startupitem.start "${prefix}/share/zabbix/zabbix_server.init start" > startupitem.stop "${prefix}/share/zabbix/zabbix_server.init stop" 58,60c59,61 < description {Use PostgreSQL 8.2.x for server database} { < depends_lib-append port:postgresql82 < configure.args-append --with-pgsql=${prefix}/lib/postgresql82/bin/pg_config --- > description {Use PostgreSQL 8.2.x for server database} { > depends_lib-append port:postgresql82 > configure.args-append --with-pgsql=${prefix}/lib/postgresql82/bin/pg_config 81,88c82,85 < variant agent_only conflicts mysql5 pgsql81 pgsql82 pgsql83 pgsql84 sqlite3 \ < description {Do not install the Zabbix server} { < depends_lib-delete port:fping \ < port:curl \ < port:openssl < < configure.args-delete --enable-server \ < --with-net-snmp --- > variant proxy \ > description {Do not install the Zabbix server but install the proxy} { > configure.args-delete --enable-server > configure.args-append --enable-proxy 91c88 < if {![variant_isset pgsql81] && ![variant_isset pgsql82] && ![variant_isset pgsql83] && ![variant_isset pgsql84] && ![variant_isset sqlite3] && ![variant_isset agent_only]} { --- > if {![variant_isset pgsql81] && ![variant_isset pgsql82] && ![variant_isset pgsql83] && ![variant_isset pgsql84] && ![variant_isset sqlite3]} { 96,97c93,94 < reinplace "s|#DBSocket=/tmp/mysql.sock|DBSocket=${prefix}/var/run/mysql5/mysqld.sock|g" \ < ${worksrcpath}/misc/conf/zabbix_server.conf --- > if { [variant_isset proxy] } { > if {![variant_isset pgsql81] && ![variant_isset pgsql82] && ![variant_isset pgsql83] && ![variant_isset pgsql84] && ![variant_isset sqlite3]} { 99,100c96,114 < reinplace "s|#FpingLocation=/usr/sbin/fping|FpingLocation=${prefix}/sbin/fping|g" \ < ${worksrcpath}/misc/conf/zabbix_server.conf --- > reinplace "s|# DBSocket=/tmp/mysql.sock|DBSocket=${prefix}/var/run/mysql5/mysqld.sock|g" \ > ${worksrcpath}/misc/conf/zabbix_proxy.conf > } > > reinplace "s|# FpingLocation=/usr/sbin/fping|FpingLocation=${prefix}/sbin/fping|g" \ > ${worksrcpath}/misc/conf/zabbix_proxy.conf > reinplace "s|# Fping6Location=/usr/sbin/fping6|Fping6Location=${prefix}/sbin/fping6|g" \ > ${worksrcpath}/misc/conf/zabbix_proxy.conf > } else { > if {![variant_isset pgsql81] && ![variant_isset pgsql82] && ![variant_isset pgsql83] && ![variant_isset pgsql84] && ![variant_isset sqlite3]} { > reinplace "s|# DBSocket=/tmp/mysql.sock|DBSocket=${prefix}/var/run/mysql5/mysqld.sock|g" \ > ${worksrcpath}/misc/conf/zabbix_server.conf > } > > reinplace "s|# FpingLocation=/usr/sbin/fping|FpingLocation=${prefix}/sbin/fping|g" \ > ${worksrcpath}/misc/conf/zabbix_server.conf > reinplace "s|# Fping6Location=/usr/sbin/fping6|Fping6Location=${prefix}/sbin/fping6|g" \ > ${worksrcpath}/misc/conf/zabbix_server.conf > } 110,111c124,147 < if { [variant_isset agent_only] } { < # Don't install MySQL data and frontend stuff for agent_only --- > if { [variant_isset proxy] } { > # Copy sample server .conf files > xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix > xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_proxy.conf \ > ${destroot}${prefix}/etc/zabbix/zabbix_proxy.conf.sample > > # Copy database data and schemas > xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/data > xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/schema > > eval xinstall -m 755 [glob ${worksrcpath}/create/data/*.*] \ > ${destroot}${prefix}/share/zabbix/data > eval xinstall -m 755 [glob ${worksrcpath}/create/schema/*] \ > ${destroot}${prefix}/share/zabbix/schema > > # Create a startup script for the proxy > xinstall -m 755 ${portpath}/${filesdir}/zabbix_proxy.init \ > ${destroot}${prefix}/share/zabbix > reinplace "s|__PREFIX__|${prefix}|g" \ > ${destroot}${prefix}/share/zabbix/zabbix_proxy.init > > # Set permissions for etc (protect passwords) > system "chmod 660 ${destroot}${prefix}/etc/zabbix/*" > system "chown zabbix:zabbix ${destroot}${prefix}/etc/zabbix/*" 113,125d148 < # Copy sample agent .conf files < xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix < xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agent.conf \ < ${destroot}${prefix}/etc/zabbix/zabbix_agent.conf.sample < xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agentd.conf \ < ${destroot}${prefix}/etc/zabbix/zabbix_agentd.conf.sample < < # Copy a startup script for the agent < xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix < xinstall -m 755 ${portpath}/${filesdir}/zabbix_agentd.init \ < ${destroot}${prefix}/share/zabbix < reinplace "s|__PREFIX__|${prefix}|g" \ < ${destroot}${prefix}/share/zabbix/zabbix_agentd.init 128,133c151,152 < # Copy sample server and agent .conf files < xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix < xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agent.conf \ < ${destroot}${prefix}/etc/zabbix/zabbix_agent.conf.sample < xinstall -m 755 ${worksrcpath}/misc/conf/zabbix_agentd.conf \ < ${destroot}${prefix}/etc/zabbix/zabbix_agentd.conf.sample --- > # Copy sample server .conf files > xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix 136c155 < --- > 140c159 < --- > 145c164 < --- > 147d165 < 151c169 < --- > 153,163c171,175 < xinstall -m 755 ${portpath}/${filesdir}/zabbix_server.init \ < ${destroot}${prefix}/share/zabbix < reinplace "s|__PREFIX__|${prefix}|g" \ < ${destroot}${prefix}/share/zabbix/zabbix_server.init < < # Create a startup script for the agent < xinstall -m 755 ${portpath}/${filesdir}/zabbix_agentd.init \ < ${destroot}${prefix}/share/zabbix < reinplace "s|__PREFIX__|${prefix}|g" \ < ${destroot}${prefix}/share/zabbix/zabbix_agentd.init < --- > xinstall -m 755 ${portpath}/${filesdir}/zabbix_server.init \ > ${destroot}${prefix}/share/zabbix > reinplace "s|__PREFIX__|${prefix}|g" \ > ${destroot}${prefix}/share/zabbix/zabbix_server.init > 165,168c177,180 < system "chmod 660 ${destroot}${prefix}/etc/zabbix/*" < system "chown zabbix:zabbix ${destroot}${prefix}/etc/zabbix/*" < system "chown -R www:www ${destroot}${prefix}/share/zabbix/frontends/*" < --- > system "chmod 660 ${destroot}${prefix}/etc/zabbix/*" > system "chown zabbix:zabbix ${destroot}${prefix}/etc/zabbix/*" > system "chown -R www:www ${destroot}${prefix}/share/zabbix/frontends/*" > 172,175d183 < # Copy Win32 agent for normal and agent_only installs < xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/zabbix_agent_win32 < xinstall -m 755 ${worksrcpath}/bin/win32/zabbix_agentd.exe \ < ${destroot}${prefix}/share/zabbix/zabbix_agent_win32 178a187 > if { [variant_isset proxy] } { 180c189,195 < "#### ZABBIX agent installation section (steps 1 - 3 only) #### --- > "#### #### > #### Begin ZABBIX proxy installation section #### > > > 1) Setup MySQL, i.e. via MacPorts: > > sudo port install mysql5-server 182d196 < 1) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_agentd.conf (rename & omit .sample) 184,185c198,210 < Set the following variable to the ip address of your ZABBIX server to < allow it access to the agent. --- > 2) Setup the ZABBIX MySQL database > > -Create the ZABBIX database > mysql5 -u root -p (enter password at prompt) > mysql> create database zabbix character set utf8; > mysql> quit; > > -Import the ZABBIX Schema > cd ${prefix}/share/zabbix/schema > cat mysql.sql | mysql5 -u root -p zabbix > cd ${prefix}/share/zabbix/data > cat data.sql | mysql5 -u root -p zabbix > cat images_mysql.sql | mysql5 -u root -p zabbix 187c212,221 < Server=x.x.x.x --- > -Create a MySQL 'zabbix' user and password > mysql5 -u root -p > mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ''; > mysql> grant all privileges on zabbix.* to zabbix identified by ''; > mysql> quit; > > > 3) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_proxy.conf (rename & omit .sample) > > Modify these variables at the very least: 188a223,225 > DBName=zabbix > DBUser=zabbix > DBPassword= 190d226 < 2) Set zabbix_agentd to run at system boot 192c228 < sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix.plist --- > 4) Set zabbix_proxy to run at system boot, then start it 194c230 < To start Zabbix manually, use: ${prefix}/share/zabbix/zabbix_agentd.init start (stop|status) --- > sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix_proxy.plist 195a232 > To start Zabbix manually, use: ${prefix}/share/zabbix/zabbix_proxy.init start (stop|status) 197,198c234 < 3) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for < installation on Windows NT 4.0, Windows 2000, and Windows XP. --- > Note: Eventually your shared memory has to be increased (see http://www.zabbix.org/forum/showthread.php?p=64232)! 201,202c237 < #### End ZABBIX agent installation section #### < #### #### --- > 5) Install zabbix_agent via MacPorts: 203a239 > sudo port install zabbix_agentd 205c241,251 < #### #### --- > > 6) Open http://localhost/zabbix/ in your browser and walk through the setup, then login with default user 'Admin' and password 'zabbix'. > > > 7) Read the fine manual at http://www.zabbix.com/documentation/ > #### End ZABBIX proxy installation section #### > #### ####" > > } else { > notes \ > "#### #### 211c257 < sudo port install mysql5-server --- > sudo port install mysql5-server 217,219c263,265 < mysql5 -u root -p (enter password at prompt) < mysql> create database zabbix character set utf8; < mysql> quit; --- > mysql5 -u root -p (enter password at prompt) > mysql> create database zabbix character set utf8; > mysql> quit; 222,226c268,272 < cd ${prefix}/share/zabbix/schema < cat mysql.sql | mysql5 -u root -p zabbix < cd ${prefix}/share/zabbix/data < cat data.sql | mysql5 -u root -p zabbix < cat images_mysql.sql | mysql5 -u root -p zabbix --- > cd ${prefix}/share/zabbix/schema > cat mysql.sql | mysql5 -u root -p zabbix > cd ${prefix}/share/zabbix/data > cat data.sql | mysql5 -u root -p zabbix > cat images_mysql.sql | mysql5 -u root -p zabbix 229,232c275,278 < mysql5 -u root -p < mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ''; < mysql> grant all privileges on zabbix.* to zabbix identified by ''; < mysql> quit; --- > mysql5 -u root -p > mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ''; > mysql> grant all privileges on zabbix.* to zabbix identified by ''; > mysql> quit; 239,241c285,287 < DBName=zabbix < DBUser=zabbix < DBPassword= --- > DBName=zabbix > DBUser=zabbix > DBPassword= 246c292 < sudo port install php5 php5-gd php5-mbstring php5-mysql php5-sockets --- > sudo port install php5 php5-gd php5-mbstring php5-mysql php5-sockets 251c297 < sudo ln -s ${prefix}/share/zabbix/frontends/php /zabbix --- > sudo ln -s ${prefix}/share/zabbix/frontends/php /zabbix 256c302 < sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix.plist --- > sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix_server.plist 260c306,307 < Note: Eventually your shared memory has to be increased (see http://www.zabbix.org/forum/showthread.php?p=64232)! --- > Note: Eventually your shared memory has to be increased (see http://www.zabbix.org/forum/showthread.php?p=64232)! > 261a309 > 7) Install zabbix_agent via MacPorts: 263,265c311 < 7) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for < installation on Windows NT 4.0, Windows 2000, and Windows XP. See < the ReadMe.txt for instructions. --- > sudo port install zabbix_agentd 271c317,322 < 9) Read the fine manual at http://www.zabbix.com/documentation/" --- > 9) Read the fine manual at http://www.zabbix.com/documentation/ > > > #### End ZABBIX server installation section #### > #### ####" > }