logdna / logdna-agent

LogDNA Agent streams from log files to your LogDNA account. Works with Linux, Windows, and macOS Servers
https://logdna.com
MIT License
138 stars 55 forks source link

API-Client interface about get_token and websockets #75

Closed Anhui-tqhuang closed 4 years ago

Anhui-tqhuang commented 5 years ago

Some question about followed code:

var postdata = {
        hostname: config.hostname
        , mac: config.mac
        , ip: config.ip
        , tags: config.tags
        , platform: config.platform
        , agentname: agentName
        , agentversion: pkg.version
        , osdist: config.osdist
        , awsid: config.awsid
        , awsregion: config.awsregion
        , awsaz: config.awsaz
        , awsami: config.awsami
        , awstype: config.awstype
    };

In some case, use logdna-agent may not satisfy some needs,write one other agent may solve the question, but when I try to write my own agent, questions comes up.

These is no clear description of this API interface to get token from server, if all of fields above needed in post data or some are not optional?, and more, just give the agent code and not expose the API interface of the server is really confused me.

In addition, there is no description on API interface used by agent to send and receive the data with the server.

I remember your doc says: we could even write our own agent, but the fact really disappoint me.

smusali commented 4 years ago

@Anhui-tqhuang,

Thanks for your question and sorry for the late response!

You can ingest logs without interacting with our API and getting an authentication token. In the newest version (v1.6.2) of LogDNA Agent, we have eliminated interaction with LogDNA API and WebSocket connections.

Here you can find information about how to ingest logs from different sources in a custom way by providing just an ingestion key. Using this example, you can build your own agent too.

Please, let us know if you have any other questions regarding this!

Have a good one, Samir Musali