How to install check_mk_agent in IBM AIX machine :
How to install check_mk_agent in IBM AIX machine :
To install the agent, simply copy it to a location where it can be executed. | |
With inetd, this should be something in the basic system search path like /usr/bin. | |
copy the check_mk_agent.aix to /tmp folder | |
cd /tmp => to move to tmp folder | |
pwd => to know where you are | |
you can use command like this to copy file from other server : | |
scp /usr/bin/check_mk_agent root@(ip destination to copy) /usr/bin/check_mk_agent | |
for example : you want to copy file from A to B, you must login to computer A and the destination is Computer B | |
ls -l | grep check_mk_agent => to see the list file, if your operation was success, there will be the file | |
//Rename file | |
cp check_mk_agent.aix check_mk_agent | |
ls -l | grep check_mk_agent => to see the list file, if your operation was success, there will be the file | |
cp /tmp/check_mk_agent /usr/bin | |
add the excecution permission to the file | |
chmod +x check_mk_agent | |
the agents file is located on the monitoring server checkmk folder /agents | |
# Agent Config | |
Inside the Agent you'll find two config settings, which need to be changed from the | |
defaults to a value that is OK on your system. | |
Edit /usr/bin/check_mk_agent and change | |
export MK_LIBDIR="/to/be/changed" | |
export MK_CONFDIR="/to/be/changed" | |
for example to these paths. | |
export MK_CONFDIR="/etc/check_mk" | |
export MK_LIBDIR="/usr/lib/check_mk_agent" | |
MK_CONFDIR can hold configuration files and MK_LIBDIR is used for the plugins. | |
Then create the directories accordingly: | |
mkdir /etc/check_mk /usr/lib/check_mk_agent /usr/lib/check_mk_agent/local /usr/lib/check_mk_agent/plugins | |
# INETD SETUP | |
In most setups, the agent is called via inetd. To setup inetd for check_mk on AIX, | |
start by adding the TCP service name to /etc/services: | |
move to folder etc: | |
cd /etc | |
pwd => to know where you are | |
ls -l | grep services => to see the list file | |
backup the file : | |
cp services services_backup_tanggal.conf => to backup the services file | |
use ls -l | grep services => to see the list file | |
edit the file services by command | |
vi services | |
to start editing press i | |
edit it and add the following entry: | |
check_mk 6556/tcp # Check_MK monitoring agent | |
to save editing press esc then : (double vertical dot) then wq | |
to close without saving press esc then : (double vertical dot) then q! | |
# Access security | |
Besides SSH which works anywhere, on AIX you have the choices of using inetd with or | |
without TCPWrappers. TCPWrappers are not available on AIX by default. | |
In the following you find instructions for setting up with and without TCPWrappers. | |
Note - in our testing, tcpwrappers only delivered correct example every 2nd call, so | |
it's not recommended to use. | |
The third way is the AIX internal firewall, which is called 'genfilt'. | |
Inetd is configured with the file /etc/inetd.conf. Add the service to it with correct path. | |
pwd to know where you are | |
ls -l | grep services => to see the list file | |
backup the file : | |
cp inetd.conf inetd_backup_tanggal.conf => to backup the services file | |
ls -l | grep inetd => to see the list file | |
edit the file services by command | |
vi services | |
to start editing press i | |
edit it and add the following entry: | |
# WITHOUT TCPWRAPPERS | |
check_mk stream tcp nowait root /usr/bin/check_mk_agent | |
to save editing press esc then : (double vertical dot) then wq | |
to close without saving press esc then : (double vertical dot) then q! | |
Then enable the service using: | |
# Restart inetd | |
refresh -s inetd | |
you can test the installation success or not by exsecute the command bellow on terminal : | |
check_mk_agent | |
there will be alot of text in your screen, it indicate your config are running well | |
or | |
you can test the installation success or not by exsecute the command bellow on monitoring server terminal : | |
telnet ipaddress 6556 | |
there will be alot of text in your screen, it indicate your config are running well | |
#THE END | |
Alternatively, | |
# WITH TCPWRAPPERS | |
edit /etc/inetd.conf to point to the tcpd daemon. | |
check_mk stream tcp nowait root /path/to/tcpd /usr/bin/check_mk_agent | |
and add an allow entry in /etc/hosts.allow that restricts the agent access. | |
check_mk: nagioshost, ip_of_nagios_host, 127.0.0.1 | |
# Restart inetd | |
refresh -s inetd | |
# Extra FEATURES | |
If you wish to have more stats from the server, there are 3 ways. | |
Sort order is by ease of configuration: | |
a) | |
enable SNMP and install the correct bundles for host stats | |
This will probably just work[tm] so this is what we recommend you to try first. | |
AIX can do SNMPv3 since 5.2 so you can secure the access if needed. See: | |
http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.commadmn%2Fdoc%2Fcommadmndita%2Fsnmpv3_intro.htm | |
b) | |
you need to get a hold of the utilities for perfstat from | |
http://www.ibm.com/developerworks/wikis/display/WikiPtype/ryo | |
Do not use the binaries since they do an eternal loop. Instead download | |
adapt.c, cpu.c, memory.c and net.c and remove the loops. | |
This code seems to be not GPLed, so we cannot include it. In fact it seems to have no | |
license at all. | |
c) compile install libstatgrab | |
Compiling libstatgrab should be OK on 5.3, on 6.x we ran into bigger issues. | |
There was some changes in AIX6.1 to make it easier to code for and libstatgrab | |
still has an definition to do complex stuff, if the OS is AIX. |
Tidak ada komentar :
Posting Komentar