Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6
The agent files also end up in /usr/local/bin by default:
[root@srv-1 zabbix-1.1beta8]# cd /usr/local/bin/ [root@srv-1 bin]# ls zab* zabbix_agent zabbix_agentd zabbix_get zabbix_sender zabbix_server [root@srv-1 bin]# ls -l zab* -rwxr-xr-x 1 root root 179347 Apr 18 10:56 zabbix_agent -rwxr-xr-x 1 root root 249257 Apr 18 10:56 zabbix_agentd -rwxr-xr-x 1 root root 18527 Apr 18 10:56 zabbix_get -rwxr-xr-x 1 root root 22631 Apr 18 10:56 zabbix_sender -rwxr-xr-x 1 root root 553797 Apr 18 10:27 zabbix_server [root@srv-1 bin]# |
Note that we did not touch the server file with our agent compile. Let’s start the agent and check the log:
[root@srv-1 bin]# ./zabbix_agentd [root@srv-1 bin]# ls /tmp/zab* /tmp/zabbix_agentd.log /tmp/zabbix_agentd.tmp /tmp/zabbix_server.log [root@srv-1 bin]# cat /tmp/zabbix_agentd.tmp netloadout1[lo] 0.000000 netloadout5[lo] 0.000000 netloadout15[lo] 0.000000 netloadin1[lo] 0.000000 netloadin5[lo] 0.000000 netloadin15[lo] 0.000000 netloadout1[eth0] 206.933333 netloadout5[eth0] 206.933333 netloadout15[eth0] 206.933333 netloadin1[eth0] 293.333333 netloadin5[eth0] 293.333333 netloadin15[eth0] 293.333333 netloadout1[sit0] 0 netloadout5[sit0] 0 netloadout15[sit0] 0 netloadin1[sit0] 0 netloadin5[sit0] 0 netloadin15[sit0] 0 cpu[idle1] 96.000000 cpu[idle5] 96.000000 cpu[idle15] 96.000000 cpu[user1] 3.466667 cpu[user5] 3.466667 cpu[user15] 3.466667 cpu[nice1] 0.133333 cpu[nice5] 0.133333 cpu[nice15] 0.133333 cpu[system1] 0.466667 cpu[system5] 0.466667 cpu[system15] 0.466667 [root@srv-1 bin]# |
This will be a dedicated Zabbix server, and we will put the files in the root of the web server. Modify the db.inc.php file and copy:
[root@srv-1 html]# pwd /var/www/html [root@srv-1 html]# vi /usr/local/src/zab*server/frontends/php/include/db.inc.php // $DB_TYPE ="POSTGRESQL"; $DB_TYPE ="MYSQL"; $DB_SERVER ="localhost"; $DB_DATABASE ="zabbix"; // $DB_DATABASE ="osmiy"; $DB_USER ="root"; $DB_PASSWORD =""; [root@srv-1 html]# cp -r /usr/local/src/zab*server/frontends/php/* ./ [root@srv-1 html]# ls acknow.php chart5.php hosts.php overview.php services.php actionconf.php chart_sla.php image.php popup.php srv_status.php actions.php charts.php images profile.php sysmap.php alarms.php config.php include queue.php sysmaps.php audio css.css index.php report1.php tr_comments.php audit.php events.php items.php report2.php tr_status.php bulkloader.php graph.php latest.php report3.php triggers.php chart.php graphs.php map.php screenconf.php users.php chart2.php history.php maps.php screenedit.php chart4.php hostprofiles.php media.php screens.php [root@srv-1 html]# |
Note that we are using a MySQL user of root. Probabably better to use a different user, but for a dedicated system with only administrators logging on, this is probably fine.