One, server-side
First, assume that you have installed the ArcSight Logger log analysis tool.
Server minimum configuration: Memory 12g, CPU * 2 (otherwise it will not be installed successfully)
Can be opened by the following link: If you successfully see the landing page, the service started successfully.
https://192.168.1.2:8443/www/ui-phoenix/com.arcsight.phoenix.PhoenixLauncher/#login
Second, the client side
1, in the ArcSight home directory has the Java Development SDK, need to copy it, add to the project.
Here, Arcsight_home for/opt/arcsight/manager/, plus/utilities/sdk/.
There is a Lib in the folder, you can copy him to the project.
2, because the use of the HTTPS protocol, so you need to add the certificate into the Java_home inside.
How do I save a certificate? Very simple.
At this point, you have a 2222.cer certificate file on your F-drive.
And then just perform
Keytool-import-file f:\2222.cer-keystore "%java_home%\jre\lib\security\cacerts"-alias server
Note that the KeyStore password is: Changeit.
The final sentence code under test:
/** * created by shaoyongyang on 2015/6/10. */package com.yanlin.esm; import com.arcsight.product.core.service.v1.client.ws.loginserviceclientfactory;import com.arcsight.product.core.service.v1.client.ws.api.loginservice;import com.arcsight.product.manager.resource.service.v1.client.ws.userresourceserviceclientfactory;import com.arcsight.product.manager.resource.service.v1.client.ws.api.userresourceservice;import com.arcsight.product.manager.resource.service.v1.model.user;import java.util.list;public class Usertestclient { public static void main (String[] args) { system.out.println ("START&NBSP;LOGIN&NBSP; ..."); loginserviceclientfactory loginserviceclientfactory = new loginserviceclientfactory (); sYstem.setproperty ("Com.arcsight.coma.client.ws.baseURL", "https://arcsightdemo:8443/www/"); LoginService loginService = Loginserviceclientfactory.createclient (); string authtoken = null; try { authtoken = loginservice.login (null, "This is the account, I will not write", "This is the password, I will not write"); } catch (exception e) { e.printstacktrace (); } userresourceserviceclientfactory userresourceserviceclientfactory = new Userresourceserviceclientfactory (); userresourceserVice userresourceservice = userresourceserviceclientfactory.createclient (); list<user> userlist = userresourceservice.getallusers (AuthToken); for (user user : userlist) { system.out.print (User.getName () + "----" + user.getpassword ()); system.out.println (); } }}
At this point, the ArcSight interface call succeeds and can exploit its data to develop something else.
ArcSight Logger HTTPS Interface Call