Prerequisites for play back agent install.
1. Firefox ESR 52.x.0
[root@apm-nms software]# yum install firefox
[root@apm-nms software]# /bin/firefox -v
Mozilla Firefox 52.8.0
[root@apm-nms software]#
[root@apm-nms software]#
[root@apm-nms software]#
[root@apm-nms software]#
2. set the repo using the command
subscription-manager repos --enable
rhel-7-server-optional-rpms
[root@apm-nms agent]# subscription-manager repos --enable
rhel-7-server-optional-rpms
Repository 'rhel-7-server-optional-rpms' is enabled for this
system.
3. xvfb
yum install Xvfb
Loaded plugins: product-id, search-disabled-repos,
subscription-manager
4. install this package for killall command that's being used
in the /etc/init.d/xvfb script
yum install psmisc
5. copy this script in /etc/init.d/xvfb
#!/bin/bash
#chkconfig: 345 95 50
#description: Starts xvfb on display 99
if [ -z "$1" ]; then
echo "`basename $0` {start|stop}"
exit
fi
case "$1" in
start)
/usr/bin/Xvfb :99 -screen 0 1280x1024x24 -ac -extension
GLX&
;;
stop)
killall Xvfb
;;
esac
6. change the permissions for xvfb
[root@apm-nms agent]# ls -ltr /etc/init.d/xvfb
-rwxr-xr-x. 1 root root 262 Jun 7 13:27
/etc/init.d/xvfb
7. edit the /etc/hosts file and add these 2 entries to the
start
127.0.0.1 localhost
10.151.26.14 apm-corp.nms.rcn.net
127.0.0.1 localhost localhost.localdomain localhost4
localhost4.localdomain4
::1 localhost localhost.localdomain localhost6
localhost6.localdomain6
~
~
8. export IGNORE_PRECHECK_WARNING=1
9. export SKIP_PRECHECK=1
10. [root@apm-nms APMADV_Agent_Install_8.1.4.0.3]# env|grep
SKIP
SKIP_PRECHECK=1
11. [root@apm-nms APMADV_Agent_Install_8.1.4.0.3]#
./installAPMAgents.sh
The following products are available for
installation:
1) Monitoring Agent for Cisco UCS
2) Monitoring Agent for DataPower
3) Monitoring Agent for DB2
4) Monitoring Agent for HTTP Server
5) Monitoring Agent for IBM Integration
Bus
6) Monitoring Agent for JBoss
7) Monitoring Agent for Linux KVM
8) Monitoring Agent for MongoDB
9) Monitoring Agent for WebSphere MQ
10) Monitoring Agent for MySQL
11) Monitoring Agent for NetApp Storage
12) Monitoring Agent for Nodejs
13) Monitoring Agent for OpenStack
14) Monitoring Agent for Oracle Database
15) Monitoring Agent for Linux OS
16) Monitoring Agent for PHP
17) Monitoring Agent for PostgreSQL
18) Response Time Monitoring Agent
19) Monitoring Agent for Ruby
20) Monitoring Agent for SAP Applications
21) Monitoring Agent for Siebel
22) Monitoring Agent for Synthetic Playback
23) Monitoring Agent for Tomcat
24) Monitoring Agent for VMware VI
25) Monitoring Agent for WebSphere
Applications
26) Monitoring Agent for WebLogic
27) Monitoring Agent for WebSphere Infrastructure
Manager
28) all of the above
Type the numbers that correspond to the products that you
want to install. Type "q" to quit selection.
If you enter more than one number, separate the numbers by a
space or comma.
Type your selections here (For example: 1,2):
15,22
The following agents will be installed:
Monitoring Agent for Linux OS
Monitoring Agent for Synthetic Playback
Are your selections correct [ 1-Yes, 2-No; default is 1 ]?
1
Please specify the agent home (default:
/opt/ibm/apm/agent):
The agent will be installed in
/opt/ibm/apm/agent
Do you accept the license agreement(s) found in the directory
/opt/software/APMADV_Agent_Install_8.1.4.0.3/licenses?
Please enter [ 1-to accept the agreement, 2-to decline the
agreement ] : 1
User has accepted the license agreement(s).
Monitoring Agent for Linux OS will be
installed.
Monitoring Agent for Synthetic Playback will be
installed.
Installing Monitoring Agent for Linux OS.
Installing Monitoring Agent for Synthetic
Playback.
#####################################################################################################################
The following agents were installed successfully into the
/opt/ibm/apm/agent directory:
Monitoring Agent for Linux OS
Agent status:
Agent is running. Process ID is 79114
Server connection status: Connecting
For more information, see the following file:
/opt/ibm/apm/agent/logs/lz_ServerConnectionStatus.txt
Monitoring Agent for Synthetic Playback
Agent status:
Agent is not running
The installation log file is
/opt/ibm/apm/agent/logs/APMADV_Agents_install.log.
For any agent that is running, the agent is configured with
the default settings.
For any agent that is not running, you must configure the
agent before it can be started.
To configure your agents, use the following detailed
instructions:
For IBM Cloud Application Performance Management
SaaS:
For IBM Cloud Application Performance Management On
Premises:
As part of the configuration instructions, you will use the
following commands to configure and manage each installed agent:
Monitoring Agent for Linux
OS /opt/ibm/apm/agent/bin/os-agent.sh start or
stop or status or uninstall
Monitoring Agent for Synthetic Playback
/opt/ibm/apm/agent/bin/synthetic_playback-agent.sh config or start or
stop or
status or uninstall
#####################################################################################################################
[root@apm-nms APMADV_Agent_Install_8.1.4.0.3]#
Reboot the box
systemctl reboot
Once you have the agent installed the agent will report to
the APM server automatically.
Go into APM WEBUI and check for the Linux VM
To configure the synthetic agent on the new
server
[root@apm-corp bin]# ./synthetic_playback-agent.sh
config
Configuring Monitoring Agent for Synthetic
Playback
Edit 'Monitoring Agent for Synthetic Playback' settings? [
1=Yes, 2=No ] (default is: 1):
The data center name for user to select as playback point of
presence.
The data center name for user to select as playback point of
presence. (default is: ):corp
This parameter allows you to specify the trace level used by
the Java providers.
Java trace level [ 1=Off, 2=Error, 3=Warning, 4=Information,
5=Minimum Debug, 6=Medium Debug, 7=Maximum Debug, 8=All ] (default is:
2):2
A class path that lists jars required by Java API data
provider that are not included with the agent. This class path is appended to
the class
path generated by the agent.
Class path for external jars (default is: ):
Configuration completed successfully.
STOP the agent
[root@apm-corp bin]# ./synthetic_playback-agent.sh
stop
Processing. Please wait...
Stopping Monitoring Agent for Synthetic Playback
...
Monitoring Agent for Synthetic Playback was stopped
gracefully.
START
[root@apm-corp bin]# ./synthetic_playback-agent.sh
start
Processing. Please wait...
Starting the Monitoring Agent for Synthetic
Playback...
Monitoring Agent for Synthetic Playback
started
SCP the FIX PACK FOR the playback agent and install
it
[root@apm-corp software]#
/opt/ibm/apm/agent/bin/synthetic_playback-agent.sh stop
Processing. Please wait...
Stopping Monitoring Agent for Synthetic Playback
...
Monitoring Agent for Synthetic Playback was stopped
gracefully.
[root@apm-corp software]# /bin/scp
dpatel@207.172.7.36:/opt/software/8.1.4.0-IBM-APM-SYNTHETIC-PLAYBACK-AGENT-XLINUX-IF0003.tar
.
dpatel@207.172.7.36's password:
8.1.4.0-IBM-APM-SYNTHETIC-PLAYBACK-AGENT-XLINUX-IF0003.tar
100% 46MB 57.3MB/s
00:00
[root@apm-corp software]#
tar -xvf
8.1.4.0-IBM-APM-SYNTHETIC-PLAYBACK-AGENT-XLINUX-IF0003.tar
[root@apm-corp software]# cd
8.1.4.0-IBM-APM-SYNTHETIC-PLAYBACK-AGENT-XLINUX-IF0003
[root@apm-corp
8.1.4.0-IBM-APM-SYNTHETIC-PLAYBACK-AGENT-XLINUX-IF0003]# ls -ltr
total 20
-rw-r--r--. 1 root root 95 Apr 10 02:17
patch.properties
-rwxr-xr-x. 1 root root 13133 Apr 10 02:17
apmpatch.sh
drwxr-xr-x. 4 root root 85 Jun 7 14:09
patches
[root@apm-corp
8.1.4.0-IBM-APM-SYNTHETIC-PLAYBACK-AGENT-XLINUX-IF0003]#
./apmpatch.sh
Detected IBM Performance Management component(s) installed in
/opt/ibm/apm/agent.
The patches for the following components will be
installed:
Monitoring Agent for Synthetic Playback [current
version: 01000502, patched version: 01000503]
Do you want to continue [ 1-Yes, 2-No; default is "1" ]?
1
Installing patches...
Successfully installed patch for Monitoring Agent for
Synthetic Playback.
systmectl reboot
Now the "corp" agent should show up when you go to synthetic
script editor
schedule a script
and under location you should have two entries 1. prod and 2.
Corp
smnptrapd.log should be snmptrapd.log!
Thanks for the very straight forward steps to be followed. 1 thing is missing, I'm a guy new to nagios maybe because of that..I configured nagios and it monitors my network and send email alerts. Now I need to send alerts in form of traps to 'Management Host' in my parent company. So I have just done all that you presented here. Am I done or should I make some more changes?
Should I replace the arguments on the script below OR where do I mention the management host IP address.
Can I check the traps in my own nagios machine as well??
===/usr/local/bin/send-host-trap=======
# Arguments:
# $1 = Management Station
# $2 = Community String
# $3 = host_name
# $4 = HostStatID A number that corresponds to the current state of the host: 0=UP, 1=DOWN, 2=UNREACHABLE.
# $5 = HOSTOUTPUT The first line of text output from the last host check (i.e. "Ping OK").
#
#
/usr/bin/snmptrap -v 2c -c $2 $1 '' NAGIOS-NOTIFY-MIB::nHostEvent nHostname s "$3" nHostStateID i $4 nHostOutput s "$5"
Thanks in Advance!!!
Hamid
command_line /usr/local/bin/send-service-trap manager public <-- manager is the hostname of management station, edit /etc/hosts file on your Nagios server and put something like this in it
# SNMP Manager Station
xxx.xx.xx.xx manager
replace xx.xxx. with the IP of your management station, after that nagios should able to resolve 'manager' you can also confirm by..
ping manager
If you followed everything correctly Nagios should be forwarding SNMP traps to the management station.
you need to coordinate with the guy managing the Management Station in your parent company make sure they copied the Nagios MIBs to correct location and loaded.
Sending and receiving traps in nagios is bit complicated specially to those who are new to Nagios. If stuck i would recommend to Google.
This is Mohammed Azhar Hussain I am running Nagios 3.3.1 on centos it working fine but I have one doubt about SNMP-2 when my monitoring switch port down it only shows SNMP-2 but there is no any notification alert. Could you please help me to assign notification on this service.
Thanks & Regards
Mohammed Azhar Hussain
how is it possible to change integer type of nHostStateID and nSvcStateID to string type ?
I'm using SNMPc software which have a problem to recognize state by number but should be work with string.
Thanks,
Jiri
I am afraid can't be of much help here due to job switch I am not working on this from last two years.
I configured by using your reference, but enterprises OID cannot send. Can you give me a solution.
Thanks
Ramana
Sending traps from Nagios side is working fine after following up the steps above. But on the other side (NMS: HP SiteScope) is recognizing the trap as string and didn't recognize the OIDs correctly!
Can anyone please advise?
Thanks in advance,,,
Tamer Moalla
How I can achieve this scenario.
I would like to know if is it possible to send SNMP traps from Nagios to another host, using the free version of Nagios (Nagios Core).
If you look at the next link (https://assets.nagios.com/handouts/nagiosxi/Nagios-XI-vs-Nagios-Core-Feature-Comparison.pdf), it says "Send & Receive SNMP Traps" is a feature of Nagios XI (payment version), not Nagios Core (free version). But if you look at this link (https://www.nagios.com/solutions/snmp-traps/), it says both solutions (Nagios XI and Nagios Core) provide that feature.
What solution would I need to send SNMP traps to another host? Could I do it using the free version of Nagios? Thanks.
Cordially,
Albert