Git Product home page Git Product logo

sumo-java-client's Introduction

Slack Status

Introduction

Sumo Logic provides a cloud-based log management solution. It can process and analyze log files in peta-byte scale. This library provides a Java client to execute searches on the data collected by the Sumo Logic service.

How to use

The Java client library is available on Maven central (http://search.maven.org/). To use it, add:

<dependency>
  <groupId>com.sumologic.api.client</groupId>
  <artifactId>sumo-java-client</artifactId> 
  <version>2.11</version>
</dependency>

to your pom.xml

Making changes to the code

mvn assembly:assembly -DdescriptorId=jar-with-dependencies to compile the code with all depedencies.

Then edit bin/run-search-job-result-dumper.sh to point to target/sumo-java-client-<version>-SNAPSHOT-jar-with-dependencies.jar

You can test out api changes with bin/run-search-job-result-dumper.sh and entering the appropriate parameters to connect with and query the api.

TLS 1.2 Requirement

Sumo Logic only accepts connections from clients using TLS version 1.2 or greater. To utilize the content of this repo, ensure that it's running in an execution environment that is configured to use TLS 1.2 or greater.

License

The Sumo Logic client library is published under the Apache Software License, Version 2.0. Please visit http://www.apache.org/licenses/LICENSE-2.0.txt for details.

Support

If you have any problems using our Java client or if you need support please do not hesitate contact us via e-mail at [email protected]

sumo-java-client's People

Contributors

c95qi avatar cddude229 avatar centic9 avatar charlessumo avatar daphy avatar davidblondeau avatar davidcarltonsumo avatar dependabot[bot] avatar frankreno avatar germanborbolla avatar jakozaur avatar kumoroku avatar kwanpeter avatar lei-sumo avatar mccartney avatar paladin8 avatar piotr-sumo avatar rvmiller89 avatar sebastian-mies avatar tanayjha avatar vagarwal96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sumo-java-client's Issues

JavaDoc Update - Explicit callout of API URLs (i.e. deployments)

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

* Sets a custom Sumo Logic API url, i.e.,

Client uses basic auth rather than a token an Authorization header

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.

HTTP Proxy not supported?

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?

remove or update version of joda time

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.

Sumologic search job returning incorrect number of messages

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.

  1. sumoClient.createSearchJob
  2. sumoClient.getSearchJobStatus(searchJobId)

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?

Search Job Records fail to parse doubles

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) 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.