elogrus | Logrus Hook for ElasticSearch

 by   sohlich Go Version: v7.0.0 License: MIT

kandi X-RAY | elogrus Summary

kandi X-RAY | elogrus Summary

elogrus is a Go library typically used in Logging applications. elogrus has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Logrus Hook for ElasticSearch
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              elogrus has a low active ecosystem.
              It has 153 star(s) with 49 fork(s). There are 9 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 9 open issues and 16 have been closed. On average issues are closed in 92 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of elogrus is v7.0.0

            kandi-Quality Quality

              elogrus has 0 bugs and 0 code smells.

            kandi-Security Security

              elogrus has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              elogrus code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              elogrus is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              elogrus releases are not available. You will need to build from source code and install.
              It has 260 lines of code, 19 functions and 2 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of elogrus
            Get all kandi verified functions for this library.

            elogrus Key Features

            No Key Features are available at this moment for elogrus.

            elogrus Examples and Code Snippets

            No Code Snippets are available at this moment for elogrus.

            Community Discussions

            QUESTION

            Cannot connect to elastic search : no active connection found: no Elasticsearch node available
            Asked 2020-Apr-27 at 14:23

            I just cannot understand what is happening. My go application is unable to connect to elastic search. The node is available, is up and running. What am I doing wrong here?

            ...

            ANSWER

            Answered 2020-Apr-27 at 14:23

            Error no active connection found: no Elasticsearch node available usually happens when you keep sniffing in client enabled but your cluster doesn't have any nodes available. You can check status of your cluster by hitting: http://host:port/_nodes/http?pretty=true.

            If you don't disable sniffing elastic Golang client will run process in background that polls /_nodes API (URL above) every 15 minutes and maintains list of healthy nodes. If there are no healthy nodes it ends with this error.

            This can happen (NOTE: we had chat with OP where we debugged issue) also when your cluster is configured with private IPs (so in /_nodes API output you see private and not public IPs). Client with sniffing starts polling, gets the list of nodes and tries to connect to private IP but gets HTTP error because such node doesn't respond (or can't be even resolved in network where client is). So it marks it dead and progresses to other one. When there are no further nodes in cluster it reports no active connection found: no Elasticsearch node available.

            To disable sniffing on client side (and to connect directly to specified node - but without any resiliency) you need to add &sniff=false to Elastic URL.

            Connection can without sniffing can be done like this:

            Source https://stackoverflow.com/questions/61455272

            QUESTION

            Integrate elastic search with Logrus (golang logging)
            Asked 2020-Apr-27 at 11:33

            I am using logrus to do all the logging my golang application. However, I also want to integrate this with Elastic Search such that all the logs are also flushed to elastic search when I create a logrus log entry. Currently all logs are created in a file as shown in the snippet below. How could I integrate with elastic search?

            ...

            ANSWER

            Answered 2020-Apr-27 at 11:33

            With elogrus you first create Elastic client and pass it to elogrus hook when creating it with elogrus.NewAsyncElasticHook(). Hook just wraps sending message to Elastic. Then you add this hook to logrus log. Every time you log message using log it will fire your hook and send message (if log level filter passes) to Elastic.

            Source https://stackoverflow.com/questions/61452091

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install elogrus

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/sohlich/elogrus.git

          • CLI

            gh repo clone sohlich/elogrus

          • sshUrl

            git@github.com:sohlich/elogrus.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link