Git Product home page Git Product logo

sumo-java-client's Issues

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?

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?

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.,

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.

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.