diff options
author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-10-06 17:54:02 +0000 |
---|---|---|
committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2001-10-06 17:54:02 +0000 |
commit | d049dd73311e864c6147c93a367c15f37cbdd929 (patch) | |
tree | c07588212d2aa54ed077331554bc2ecabd5afa03 | |
parent | 6a13da2566db76fd92daae387099720e1b2cdf22 (diff) | |
download | zabbix-d049dd73311e864c6147c93a367c15f37cbdd929.tar.gz zabbix-d049dd73311e864c6147c93a367c15f37cbdd929.tar.xz zabbix-d049dd73311e864c6147c93a367c15f37cbdd929.zip |
- minor fixes in doc/manual.txt (Alexei)
- minor fixes in INSTALL (Alexei)
- added support for check_port[*], which tries to connect to the port (Aelxei)
git-svn-id: svn://svn.zabbix.com/trunk@230 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | INSTALL | 9 | ||||
-rw-r--r-- | doc/manual.txt | 69 | ||||
-rw-r--r-- | src/zabbix_agent/sysinfo.c | 18 | ||||
-rw-r--r-- | src/zabbix_agent/sysinfo.h | 2 |
5 files changed, 80 insertions, 23 deletions
@@ -1,8 +1,11 @@ Changes for 1.0alpha12: + - minor fixes in doc/manual.txt (Alexei) + - minor fixes in INSTALL (Alexei) + - added support for check_port[*], which tries to connect to the port (Aelxei) + - new type of parameters: parameter[*], actual value of "*" can be passed from Zabbix server (Alexei) - - zabbix_agentd will lower scheduling priority to 5 (Alexei) - fixed broken customized graphs, file chart2.html (Alexei) @@ -36,7 +36,7 @@ Software Requirements - MySQL 3.22 or later or - PostgreSQL 7.0.2 or later - - PHP 1.0 or later, compiled as Apache module with + - PHP 4.0 or later, compiled as Apache module with - GD module (for PNG images) - MySQL of PostgreSQL module - mhash support @@ -85,6 +85,11 @@ Running Zabbix as "root," "bin," or any other account with special rights is a s On Linux, use command tar -xvzf <zabbix.tar.gz>. +On other systems, try + +gunzip zabbix.tar.gz +tar xvf zabbix.tar + 1.2.3 Create the Zabbix database Zabbix comes with SQL scripts used to create the required database schema and also to insert a default configuration. There are separate scripts for MySQL and PostgreSQL. @@ -137,7 +142,7 @@ make 1.2.6 Copy created binaries from bin/ to /opt/zabbix/bin or any other directory -Other common directories are /usr/local/bin or usr/local/zabbix/bin. +Other common directories are /usr/local/bin or /usr/local/zabbix/bin. 1.2.7 Configure /etc/services diff --git a/doc/manual.txt b/doc/manual.txt index 1a95b1d3..f1b690fb 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -363,22 +363,44 @@ Amount of unused physical memory. Amount of unused disk space for given volume. +Example: + +diskfree[/] - returns free disk space for root volume. + - inodefree[*] Number of unused inodes space for given volume. +Example: + +inodefree[/var] - returns number of free inodes for volume /var + - cksum[*] Check sum of given file. +Note, that currently all supported file names are hardcoded to sysinfo.c + +Example: + +cksum[/etc/passwd] + - filesize[*] Size of given file. +Example: + +filesize[/var/log/syslog] + - proc_cnt[*] Number of processes called "*" running. +Example: + +proc_cnt[inetd] + - swap[free] Free swap space. @@ -427,58 +449,67 @@ Always return 1. Number of established TCP connections. -- service_check[ftp] +- check_service[ftp] Check either FTP server is running and accepting connections. Result: 0 - FTP server is down 1 - FTP server is running -- service_check[ssh] +- check_service[ssh] Check either SSH server is running and accepting connections. Result: 0 - SSH server is down 1 - SSH server is running -- service_check[smtp] +- check_service[smtp] Check either Email (SMTP) server is running and accepting connections. Result: 0 - SMTP server is down 1 - SMTP server is running -- service_check[pop] +- check_service[pop] Check either POP server is running and accepting connections. Result: 0 - POP server is down 1 - POP server is running -- service_check[nntp] +- check_service[nntp] Check either NNTP server is running and accepting connections. Result: 0 - NNTP server is down 1 - NNTP server is running -- service_check[imap] +- check_service[imap] Check either IMAP server is running and accepting connections. Result: 0 - IMAP server is down 1 - IMAP server is running +- check_port[*] + +Check either possible to connect to port number "*". + +Result: 0 - can connect + 1 - cannot connect + +Example: Use check_port[80] to check either WEB server accepts connections. + 4.3 Supported parameters by platform PARAMETER / SYSTEM | Debian Woody | Debian Potato | FreeBSD 4.3 | Solaris 5.8 | HP-UX 11.00 | AIX 4.3 | | (i386) | (i386) | (i386) | (Ultra-60) | 9000/800 | (PowerPC) | ---------------------------------------------------------------------------------------------------------------------- -memory[total] | X | X | - | - | x | - | -memory[shared] | X | X | - | - | - | - | -memory[buffers] | X | X | - | - | - | - | -memory[cached] | X | X | - | - | - | - | -memory[free] | X | X | - | - | x | - | +memory[total] | X | X | - | - | x | - | +memory[shared] | X | X | - | - | - | - | +memory[buffers] | X | X | - | - | - | - | +memory[cached] | X | X | - | - | - | - | +memory[free] | X | X | - | - | x | - | diskfree[*] | X | X | X | X | X | X | @@ -524,16 +555,16 @@ net[listen_80] | X | X | - | net[listen_110] | X | X | - | - | - | - | net[listen_143] | X | X | - | - | - | - | -service_check[ftp] | X | X | ? | ? | ? | ? | -service_check[ssh] | X | X | ? | ? | ? | ? | -service_check[smtp] | X | X | ? | ? | ? | ? | -service_check[pop] | X | X | ? | ? | ? | ? | -service_check[nntp] | X | X | ? | ? | ? | ? | -service_check[imap] | X | X | ? | ? | ? | ? | - -proc_cnt[*] | X | X | - | - | - | - | +check_service[ftp] | X | X | X | X | X | X | +check_service[ssh] | X | X | X | X | X | X | +check_service[smtp] | X | X | X | X | X | X | +check_service[pop] | X | X | X | X | X | X | +check_service[nntp] | X | X | X | X | X | X | +check_service[imap] | X | X | X | X | X | X | +check_port[imap] | X | X | X | X | X | X | +proc_cnt[*] | X | X | - | - | - | - | 5. Miscellaneous diff --git a/src/zabbix_agent/sysinfo.c b/src/zabbix_agent/sysinfo.c index ad2b1966..ab0ee04f 100644 --- a/src/zabbix_agent/sysinfo.c +++ b/src/zabbix_agent/sysinfo.c @@ -133,6 +133,8 @@ COMMAND commands[]= {"net[listen_23]" ,TCP_LISTEN, "0017"}, {"net[listen_80]" ,TCP_LISTEN, "0050"}, + {"check_port[*]" ,CHECK_PORT, "80"}, + {"check_service[ssh]" ,CHECK_SERVICE_SSH, 0}, {"check_service[smtp]" ,CHECK_SERVICE_SMTP, 0}, {"check_service[ftp]" ,CHECK_SERVICE_FTP, 0}, @@ -971,9 +973,15 @@ float tcp_expect(char *hostname, short port, char *expect,char *sendtoclose) return 0; } + if( expect == NULL) + { + close(s); + return 1; + } + memset(&c, 0, 1024); recv(s, c, 1024, 0); - if (strncmp(c, expect, strlen(expect)) == 0) + if ( strncmp(c, expect, strlen(expect)) == 0 ) { send(s,sendtoclose,strlen(sendtoclose),0); close(s); @@ -1016,3 +1024,11 @@ float CHECK_SERVICE_IMAP(void) { return tcp_expect("127.0.0.1",143,"* OK","a1 LOGOUT\n"); } + +float CHECK_PORT(char *port) +{ + int i; + + i=atoi(port); + return tcp_expect("127.0.0.1",i,NULL,""); +} diff --git a/src/zabbix_agent/sysinfo.h b/src/zabbix_agent/sysinfo.h index d0819ff5..363904aa 100644 --- a/src/zabbix_agent/sysinfo.h +++ b/src/zabbix_agent/sysinfo.h @@ -38,6 +38,8 @@ float CHECK_SERVICE_POP(void); float CHECK_SERVICE_NNTP(void); float CHECK_SERVICE_IMAP(void); +float CHECK_PORT(char *port); + #define COMMAND struct command_type COMMAND { |