npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

node-red-contrib-log-elk

v1.3.4

Published

A Node-RED logging node with multiple outputs using the winston,winston-elasticsearch and winston-loki logging libraries

Readme

node-red-contrib-log-elk

node-red-contrib-log-elk is a Node-RED logging output node that supports multiple logging destinations, including ElasticSearch, Loki (Grafana), local files, the system console, and the Node-RED debug window. This node is designed to provide flexible and configurable logging options for Node-RED flows.


Features

  • ElasticSearch Integration: Log messages to an ElasticSearch instance with support for authentication.
  • Loki Integration: Log messages to a Loki instance with support for headers, authentication, and app labels.
  • File Logging: Log messages to a local file with configurable file size and rotation options.
  • System Console Logging: Log messages to the system console for debugging and monitoring.
  • Debug Window Logging: Log messages to the Node-RED debug window for easy access during development.
  • Dynamic Configuration: Use environment variables to dynamically configure logging options.

Configuration

Logging Outputs

This node supports the following logging outputs:

  1. ElasticSearch:

    • Elastic URL: The URL of your ElasticSearch instance (e.g., http://localhost:9200).
    • Username: The username for authentication (if required).
    • Password: The password for authentication (if required).
  2. Loki:

    • Loki URL: The URL of your Loki instance (e.g., http://localhost:3100).
    • Username: The username for authentication (if required).
    • Password: The password for authentication (if required).
    • Headers (JSON): Additional headers to include in requests, specified as a JSON object. Example:
      {
          "X-Scope-OrgID": "${TENANT}"
      }
    • App Label: A label to identify the application in Loki logs (e.g., node-red).
  3. File:

    • Filename: The name of the log file (e.g., log-elk.log).
    • File Size: The maximum size of the log file in megabytes (minimum: 1 MB).
    • Max Files: The maximum number of log files to retain (minimum: 1).
  4. System Console:

    • Logs messages to the system console for debugging or monitoring.
  5. Debug Window:

    • Logs messages to the Node-RED debug window for easy access during development.

Environment Variables

You can use environment variables to dynamically configure the logger. For example, instead of hardcoding the ElasticSearch URL or Loki credentials, you can use ${ENV_VAR} syntax in the fields. At runtime, these placeholders will be replaced with the corresponding environment variable values.


Dependencies

This project uses the following libraries:


Credits

Initial parts of this project were based on node-red-contrib-advance-logger.


License

This project is licensed under the MIT License. See the LICENSE file for details.