Documente Academic
Documente Profesional
Documente Cultură
Overview
www.arcsight.com
Agenda
www.arcsight.com
www.arcsight.com
www.arcsight.com
JMX-WS/WSMan Client
iPhone/iPad
Demo
www.arcsight.com
Server Architecture
www.arcsight.com
ESM Manager
Server DM
Plugin DM
Plugin DM
Plugin DM
ArcSight DM Framework
ArcSight DM
Core Services
J2EE Container DM
Service
ArcSight DM
Service Extention
Equinox (OSGI)
JVM
www.arcsight.com
www.arcsight.com
A SOA platform
Expose ArcSight ESM functionalities to web services
By protocol
WSDL
www.arcsight.com
10
Service Implementation
SOAP
www.arcsight.com
Jersey
JAXRS1.0
GWTRPC
JSR262
RI
REST/J
SON,
XML
GWT
RPC
JMXW
S
11
www.arcsight.com
12
www.arcsight.com
13
www.arcsight.com
14
www.arcsight.com
15
SOA infrastructure
ArcSight ESM 5.0 Services
ArchiveReportService
ManagerSearchService
ResourceService
DashboardService
Currently Service Layer provides service around following resources
ArchiveReport
Dashboard
DataMonitor
FileResource
Portlet
Report
Basic Resource (contains attributes share among all resources)
Resource Reference
ViewerConfigurarion
www.arcsight.com
16
https://myhost:8443/www/manager-service/services/listServices
www.arcsight.com
17
https://myhost:8443/www/managerservice/services/servicename?wsdl
www.arcsight.com
18
www.arcsight.com
19
www.arcsight.com
20
Setup JDK
www.arcsight.com
21
www.arcsight.com
22
www.arcsight.com
23
www.arcsight.com
24
"Manual");
// Download report using the download job id
download(
new URL(
"https://yanlinwang-pc:8443/www/manager-service/fileservlet?file.command=download&file.id="
+ fileId), "Resources Updated Report.html");
www.arcsight.com
25
APIs
www.arcsight.com
26
Documents
Find ArcSight ESM web
services API in
$ARCSIGHT_HOME/utilites/sdk/lib
/manager-javadoc1.0.0.release.xxx.jar
www.arcsight.com
27
www.arcsight.com
28
Consuming Service
via REST Programmatically (Slide 1 of 4)
Pros
Simple
No need to setup SDK libraries
Return data will be XML/JSON
Cons
Not strong typed
Not suitable for large application
www.arcsight.com
29
Consuming Service
via REST Programmatically (Slide 2 of 4)
/**
* generate ESM REST service URL based on parameters
*
* @param moduleName - ESM service module (eg. manager-service)
* @param serviceName - ESM service name (eg. ManagerSearchService)
* @param methodName - service method name (eg. search1)
* @param params - REST service parameters
* @return url string
*/
public static String getRestUrl (String moduleName, String serviceName, String methodName, HashMap<String, String> params)
{
String url = "https://yanlinwang-pc:8443/www/" + moduleName + "/rest/" + serviceName + "/" + methodName;
www.arcsight.com
30
Consuming Service
via REST Programmatically (Slide 3 of 4)
/**
* Query a REST service and return the xml data
*
* @param moduleName - ESM service module (eg. manager-service)
* @param serviceName - ESM service name (eg. ManagerSearchService)
* @param methodName - service method name (eg. search1)
* @param params - REST service parameters
* @return REST response xml
* @throws Exception
*/
public static String getRestXml(String moduleName, String serviceName,
String methodName, HashMap<String, String> params) throws Exception {
String urlstr = getRestUrl(moduleName, serviceName, methodName, params);
URL url = new URL(urlstr);
URLConnection connection = url.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
StringBuffer sb = new StringBuffer();
String line;
while ((line = in.readLine()) != null) {
sb.append(line);
}
in.close();
return sb.toString();
}
www.arcsight.com
31
Consuming Service
via REST Programmatically (Slide 4 of 4)
//Login through REST
HashMap<String, String> params = new HashMap<String, String>();
params.put("login", "admin");
params.put("password", "password");
String xml = getRestXml("core-service", "LoginService", "login", params);
// Parse the XML for token
DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
DocumentBuilder b = f.newDocumentBuilder();
Document d = b.parse(new ByteArrayInputStream( xml.getBytes()));
Node node = d.getDocumentElement().getChildNodes().item(0);
String token = node.getTextContent();
if (token==null){
System.out.println("Failed to login");
System.out.println (xml);
return;
}
//Search datamonitor resource
params = new HashMap<String, String>();
params.put("authToken", token);
params.put("queryStr", "datamonitor event throughput" );
params.put("pageSize", "50");
String resXml = getRestXml("manager-service", "ManagerSearchService", "search1", params);
www.arcsight.com
32
Poor
33
ArcSight, Inc.
Corporate Headquarters: 1 888 415 ARST
EMEA Headquarters: +44 (0)844 745 2068
Asia Pac Headquarters: +65 6248 4795
www.arcsight.com
www.arcsight.com
34