sumologic / sumo-java-client Goto Github PK
View Code? Open in Web Editor NEWJava client for the Sumo Logic API.
Java client for the Sumo Logic API.
When trying to delete a collector or source, the method does not attempt to make the call. Does not even raise an exception if given the wrong id.
Some customers are confused between using getMessagesForSearchJob and getRecordsForSearchJob so README probably should clarify and also refer back to the Search API page (https://help.sumologic.com/APIs/Search-Job-API/About-the-Search-Job-AP).
Basic auth doesn't seem to be supported now. The client should use an Authorization header with a generated token instead.
This is a pretty easy change to make, and I could do this myself and submit a PR, if the client is otherwise mostly working. I'd love to use the java client to write a little groovy command line app.
I have a SumoLogic Java client that connects to the server via proxy, but I'm receiving a connection timeout error. Is there a way to set the proxy in the HttpClient configuration?
Currently this client provide HttpSource, AmazonS3Source,& etc but there is no support for Amazon ELB.
We are using Sumologic SDK for doing a search in sumologic.
So first we are creating a search job, then checking the status of the job.
Here is the search job status object looks like :
'DONE GATHERING RESULTS', histogram buckets: [startTimestamp: 'Thu Nov 09 00:50:00 EST 2023', length '300000', count: '24630', startTimestamp: 'Thu Nov 09 00:45:00 EST 2023', length '300000', count: '32273', startTimestamp: 'Thu Nov 09 00:40:00 EST 2023', length '300000', count: '30581', startTimestamp: 'Thu Nov 09 00:35:00 EST 2023', length '300000', count: '31248', startTimestamp: 'Thu Nov 09 00:30:00 EST 2023', length '300000', count: '34215', startTimestamp: 'Thu Nov 09 00:25:00 EST 2023', length '300000', count: '28418', startTimestamp: 'Thu Nov 09 00:20:00 EST 2023', length '300000', count: '27152', startTimestamp: 'Thu Nov 09 00:15:00 EST 2023', length '300000', count: '28202', startTimestamp: 'Thu Nov 09 00:10:00 EST 2023', length '300000', count: '22615', startTimestamp: 'Thu Nov 09 00:05:00 EST 2023', length '300000', count: '28433', startTimestamp: 'Thu Nov 09 00:00:00 EST 2023', length '300000', count: '27646', startTimestamp: 'Wed Nov 08 23:55:00 EST 2023', length '300000', count: '26589', startTimestamp: 'Wed Nov 08 23:50:00 EST 2023', length '300000', count: '29374', startTimestamp: 'Wed Nov 08 23:45:00 EST 2023', length '300000', count: '29885', startTimestamp: 'Wed Nov 08 23:40:00 EST 2023', length '300000', count: '28580', startTimestamp: 'Wed Nov 08 23:35:00 EST 2023', length '300000', count: '29932', startTimestamp: 'Wed Nov 08 23:30:00 EST 2023', length '300000', count: '32426', startTimestamp: 'Wed Nov 08 23:25:00 EST 2023', length '300000', count: '28755', startTimestamp: 'Wed Nov 08 23:20:00 EST 2023', length '300000', count: '30891', startTimestamp: 'Wed Nov 08 23:15:00 EST 2023', length '300000', count: '28168', startTimestamp: 'Wed Nov 08 23:10:00 EST 2023', length '300000', count: '27221', startTimestamp: 'Wed Nov 08 23:05:00 EST 2023', length '300000', count: '30331', startTimestamp: 'Wed Nov 08 23:00:00 EST 2023', length '300000', count: '34658', startTimestamp: 'Wed Nov 08 22:55:00 EST 2023', length '300000', count: '35714', startTimestamp: 'Wed Nov 08 22:50:00 EST 2023', length '300000', count: '39262', startTimestamp: 'Wed Nov 08 22:45:00 EST 2023', length '300000', count: '41335', startTimestamp: 'Wed Nov 08 22:40:00 EST 2023', length '300000', count: '42725', startTimestamp: 'Wed Nov 08 22:35:00 EST 2023', length '300000', count: '40337'], message count: '200000', record count: '2027', pending warnings: [], pending errors: []
We are waiting till the status of the job states as "DONE GATHERING RESULTS" and reading the messages count.
So here, the messageCount always showing as 200000 when there are more than 200000 messages.
So, can someone help me here, What am I missing, or is there any limitation on number of messages in sumo logic api?
We should update the JavaDoc referenced below to call out that we are defaulting to the US1 deployment of Sumo Logic and that the consumer of the SDK must update this to interact with any other deployments. We should also link to our docs showing the full list of deployments and their URLs - https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-by-Deployment-and-Firewall-Security
Not sure if you're ready for Java 8 time, but either way, how about removing joda time as you've got an old version and its causing conflicts with other projects such as AWS SDK version due to missing methods. I've worked around it but it probably will hit other users.
When parsing the records from search results, the doubleField
method fails with the following exception:
sumo.getRecordsForSearchJob(searchJobId, 0, 10).getRecords().get(0).doubleField("done_tasks_upper")
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NumberFormatException: For input string: "done_tasks_upper"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at com.sumologic.client.searchjob.model.SearchJobRecord.doubleField(SearchJobRecord.java:85)
at com.sumologic.MyCode(MyCode.java:49)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.