• No results found

Moving beyond hardware

N/A
N/A
Protected

Academic year: 2021

Share "Moving beyond hardware"

Copied!
74
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)

` These slides represent the work and opinions

of the author and do not constitute official positions of any organization sponsoring the author’s work

` This material has not been peer reviewed and

is presented here with the permission of the author.

` The author assumes no liability for any

content or opinion expressed in this

(3)

` Michael Medin

` I work with Integration

Not system administration

Currently at Oracle Corporation

x But do not worry!

x I am NOT here to sell you anything

` I am also

A developer

An avid fan of open sourceThe author of NSClient++

(4)

` Introduction

Integration

Applications Monitoring and Application ServersJMX ` JMX Tools ◦ Nagios perspectiveZenoss perspective ` Using JMX ◦ Exploring JMXMonitoring JMXExtending JMX

(5)

` Who monitors their applications today? ` Who uses JMX

` Who uses WMI ` Who uses SNMP

` Who uses custom built “things” ` What else do you use?

(6)

` What do you monitor? ` Application Errors? ` Memory? ◦ System Memory?Application Memory?Component memory? ` Threads? ` Database pools? ` Internal Errors? ` Messages? ` “Non events”? ` Performance? ◦ System Performance?Database Performance?Application Performance?Component Performance?

(7)
(8)
(9)

` In this case: ◦ FTPWeb ServicesDatabasesApplication serversIPC ` But often: ◦ FilesQueuesEDIFactEBXMLEmail messagesNetworkVPNExternal componentsetc ` Metrics: ◦ DisksSystem LoadMemory utilisationDatabase UtilizationPerformanceProcessesBusiness ProcessMessages

(10)

How would you approach something like this? A lot of custom scripts?

Use the supplied “GUI”?

Some basic standard and custom things? Maybe simpler to skip monitoring?

(11)

Nagios (op5) •Files •FTP •Disks •System Load •Memory utilization Grid Control •Databases (oracle) •Queues •Database Utilization •Performance Scripts •Applications •Web services •Database •Application servers BPEL Console •Processes •Services (some) BAM

(Business Application Monitor)

•Business Process B2B •EDIFact •EBXML •RosettaNet Home Brew •Email messages •etc

(12)

` The Tech Support Team ◦ NagiosScripts ` The DBA ◦ Grid ControlScripts

` The ICC Operations Team

Home brew (usually part of the application)BPEL Console

BAM

(13)

` Many systems means;

Many places to lookMany people to ask

NOT many people who knows it is broken

x (Often no one at all)

` Hard to;

Correlate dataBe proactive

Find performance bottlenecksFind missing files

(14)
(15)

We spend millions of euro to build

“one integrated system”

for business messages. “Why not save money using

“one integrated system”

(16)
(17)
(18)
(19)
(20)

` A net work administrator changes a firewall rule

Preformed during the service window

The service windows is 23:00 -> 02:00 (Friday)

` The network admin

Checks the monitoring and checklistsEverything is green!

Goes home happy (grabs a beer on the way home)

` The integration staff is not on call (only 8-17)

An integrations service breaks x (as a database pool gets corrupted)

No one sees this (no one is checking the “BPEL Console”)

` This is discovered on Monday at 09:00

(21)
(22)

` Application memory

Make sure the application has available memory(not the same as the system memory usage)

` Threads

Make sure we have active threadsBut not too many

` Sessions

Make sure the application is usedBut not to much

` Response Time

How long are requests takingHTTP, EJB, Database, etc etc

(23)

` Database pool

Make sure the application can access the databaseMake sure the database is being used

` Transactions

How long did transactions take

How many transactions are committedHow many are rolled back

` Queues

How many messages are waiting (are the queues filling

up)

` And this is just a few examples

(24)
(25)

` It depends on who you ask ◦ 20 years ago I would have said:

x This assembler thing I wrote

10 years ago I would have said: x This C++ thing we wrote.

Now I usually answer this J2EE system ` This means Java (and .net)

And they usually run in an application server ` Java

Inside a Java J2EE Application server

x JBoss, WLS, WebSphere, OC4J, Orion, etc etc... ` .Net

Inside .Net framework x Microsoft .Net Framework

(26)
(27)

` Main tasks are to:

Manage applicationsProvide resources

Deliver utility functions

` Manage means to manage;

State

Resources

Configuration

Connections (database etc)

Pools (thread, memory, database, etc)Caches

etc

` Wait…

(28)
(29)

` JDBC

Database connections (and pools)

` JMS

Queues (and such)

` JTA

Transactions

` <Random acronym here>

Whatever buzzword is popular today

` And the best things is:

All this is provided and managed by the application

(30)

` Out of the box we can monitor:

Database connectionsDatabase pools

Queues

Transactions

Etc etc etc etc etc etc (yes, there is a lot more)

` Almost all resources are managed!

So we can out of the box monitor most things

(31)

` The default and standard way is: ◦ JMX ` Other options; ◦ SNMP“Web Services”Scripts

Various proprietary solutions

x (often provided by the Application Server)

Custom Written things

` But JMX is the standard way in Java

(32)

` .Net provides the same thing

WMI (Windows Management Instrumentation)(but not as extensive)

(33)
(34)

` Java Management Extensions

` API for management communication

(35)

` JMX Consists of:

Agent

x A repository of MBeans

Client

x The user (in your case check_jmx)

Mbeans

x Providers (in your case server components) x Which can be monitored

(36)

` Managed Bean

` Accessed through the Agent ` You can:

Probe informationChange parameters

Execute administrative functionsSubscribe to events

` There is a lot more

(37)

` Attributes ◦ Set x Write attributes ◦ Get x Read attributes ` Operations ◦ Execute x Run commands ` Notifications ◦ Subscribe x Subscribe to events ` Nagios ◦ Check commands x Read attributes ◦ Event handlers x Execute operations x Write attributes ◦ Passive Checking (NSCA) x Notifications

(38)

` A big list of objects.

` Will change “live” as the application runs

` BUT not always the “same” repository

(39)

` A managed object

Has metadata (descriptions)Identified by:

x A name

Usually key/value pairs

x For instance:

x Name=Something, Type=Something, etc etc ◦ A part of your application (server)

(40)

` The JMX specification does NOT support

remote checking!

` Usually this is circumvented by using RMI

The sad word here is Usually!

` Remember

There are other options then JMX

(41)
(42)

` Nagios is “script” driven

` Means you have a “check_xxx” for everything

x check_cpu x check_mem x check_nrpe x check_... ` Application Server ◦ Exposes x Jmx (Java) x WMI (.Net)

(43)

` Generic JMX Plugin ◦ Jmxquery/Syabru/* (check_jmx)check_jmx4perl ` JBoss Plugin ◦ JBossNagiosPluginMonju ` Others (non JMX) ◦ JSend NSCA

(44)

` Written in python/java

` Remote or local JMX connection ` Forks java (once per check)

` Only > check

` Does not support “custom protocols”

(45)

` Notes:

Always use –vvvv when testing x Or no errors will be displayed

` Command syntax: check_jmx -U <URL> -O <Object> -A <Attribute> -w <warning> -c <critical>

` Sample command (from -help):

check_jmx

-U service:jmx:rmi:///jndi/rmi://localhost:8888/jmxrmi -O java.lang:type=Memory

-A NonHeapMemoryUsage -K used -w 100000000 -c 128000000

(46)

` Command:

jbossJMX_plugin

` Written in Perl

` Only local checks (ie. NRPE/SSH) ` Forks Java (once per check)

` Only > checks

` Presumably works with other servers but

(47)

` Notes:

Version is only to find Jboss

` Command syntax:

jbossJMX_plugin <JBoss Server URL>

<JBoss Version 3|4> <JBoss MBean Object Name> <JBoss MBean Attribute>

<Warn Threshhold> <Critical Threshhold>

` Sample command: jbossJMX_plugin 127.0.0.1 3

jboss.jca:name=ORACLEDSN,service=ManagedConnectionPool“ InUseConnectionCount 20 50

(48)

` Written in Python (check) and Java (servlet) ` Based on a servlet (agent)

No forking

(requires deploy on a webserver)

` Only > checks

` Pretty hard to write queries

(49)

` Notes:

Very complex and hard to use

` Command syntax:

./check_jboss.sh 'nagios/jmx? obj_name=<object

name>&attribute=$<attribute name>&is_int=<integer>&warn=<warn value>&crit=<crit value>' ` Sample Command: ◦ check_jboss.sh ‘nagios/jmx?obj_name=jboss.system:type=ServerInfo &attribute=FreeMemory&is_int=true&warn=10000000 0&crit=50000000’

(50)

` Written in Perl (check) and Java (servlet) ` Based on a servlet (agent)

No forking

(51)

` Notes:

URL is NOT! JMX Url (it is java component)

` Command Syntax:

check_jmx4perl

x --url <j4p URL> x --name <alias> x --mbean <Mbean>

x --attribute <atribute> --path <part> x --critical <crit>--warning <warn> ` Sample Command:

check_jmx4perl

x --url http://localhost:8888/j4p x --name memory_used

x --mbean java.lang:type=Memory

x --attribute HeapMemoryUsage --path used x --critical 10000000 --warning 5000000

(52)

` Jmx4perl ◦ The good: x Powerfull syntax x Nagios “standard” x No forking ◦ The Bad:

x Requires a custom component on the server x No security model

` check_jmx

The good:

x Java “Standard”

x Standard security model ◦ The bad:

x Very basic usage

(53)

` Check_perfect_jmx

Local Java agent (one process)

x With a simple socket/NRPE/* interface x Which connects to Java agents via RMI/* x And checks remotly

(54)
(55)

` First off I have only looked into this briefly!

Never managed to figure out how Zenoss worksSo I could be wrong

` Relays on Java

Runs in the background (as a “demon” locally)One “demon” per target server

(56)
(57)

` JConsole

Comes with Java (1.5 and later)Can attach to local processes

x Without any configuration

Can attach to remote processes

x Given a connection string

` Third party browsers

(58)
(59)
(60)
(61)

` Mbean name:

◦ com.bea:Name=soa_server1,Type=ServerLifeCycleRuntime

` Breaking it down we get

com.bea x Namespace ◦ Name=soa_server1 x Property (name) ◦ Type=ServerLifeCycleRuntime x Property (type)

` This looks like a “query” but it is not a query!

(62)
(63)
(64)

` Heap space (what usually fills up) ◦ java.lang:type=Memory

x getHeapMemoryUsage() ` Memory Pools

java.lang:type=MemoryPool,name=pool's name x Eden Space (Heap Memory)

x Pool from which memory is initially allocated for most objects

x Survivor Space (Heap Memory)

x Pool containing objects that have survived GC of eden space.

x Tenured Generation (Heap Memory)

x Pool containing objects that have existed for some time in the

survivor space.

x Permanent Generation (Non-Heap)

x Holds all the reflective data of the virtual machine itself, such as class

and method objects. With JVMs that use class data sharing, this generation is divided into read-only and read-write areas.

(65)

` Thread Pools

java.lang:type=Threading

x ThreadCount

x Number of current threads

x PeakThreadCount

(66)

` Will be different depending on your

application server

(67)

What your applications relay on is nothing I know you need to talk to your application

developers!

But the why to do it is JMX! (or WMI for windows ☺)

(68)
(69)

` Writing custom Mbeans is very simple

` Always better then a “home brew” solution ` Ask your developers

(70)

` Simple example:

public interface HelloMBean {

public String getName();

}

public class Hello implements HelloMBean {

public String getName() { return ”Hello World”; }

}

class Sample {

public static void main(String[] args) {

MBeanServer mbs =

ManagementFactory.getPlatformMBeanServer(); ObjectName name = new

ObjectName("com.example:type=Hello"); mbs.registerMBean(new Hello(), name);

}

(71)
(72)

` Application Monitoring is fun ` JMX is pretty simple

` JMX is very powerful ` JMX is better

` JMX is the standard

` For windows replace JMX with WMI above!

(73)
(74)

[email protected]

http://www.linkedin.com/in/mickem http://www.medin.name

Information about NSClient++ http://nsclient.org

Slides, and examples at:

References

Related documents

Loading-case3 (displacement in the middle area of the plate upper surface) is useful to investigate the stress distribution correlated to a dis- placement applied on the

The merger-acquisition of MoneyLine by Ingenico and the corresponding Ingenico share capital increase will be effective on October 31, 2006, subject to the approval of

When an auditor is unable to inspect and count a clients investment securities until after the balance sheet date, the bank where the securities are held in a safe-deposit box

This paper has proposed a complex stock trading strate- gy, namely weight reward strategy (WRS), generated from different combinations of moving average and trading range break-out

These results suggest that a common limit may be at work in both visual working memory and long-term memory: the asymptotic fidelity observed in visual working memory may not be

The work has focused on MEWP occupants being trapped against overhead or adjacent objects whilst in the platform of the MEWP, particularly when the operator becomes trapped over

Ensure you loan modification you to catch up, or payment can control when your home equity with your mortgage term could refinance a way.. Supporting and home loan modification, if

1928.4 In order to be eligible for Medicaid reimbursement, each physical therapy professional shall conduct an assessment of physical therapy needs within the first