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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cloud-log-collector

v0.1.14

Published

Collect log from mutiple servers

Downloads

5

Readme

Cloud Log Collector

This is a simple log collector system.

Checkout www.cloud-log-collector.com for more details

Here for the french version

The primary goal of this project is to have a simple log collector system, assisted by a configuration wizard, and able to be deployed on several thousand of servers.

A simple and secure log collector.

1. How to install NodeJS (Ubuntu) :

sudo apt --yes install nodejs
sudo apt --yes install nodejs-legacy
sudo apt --yes install npm
sudo npm install npm@latest -g
sudo npm install -g n
sudo n lts

2. How to install Cloud Log Collector :

sudo npm install -g cloud-log-collector

3. How to configure Cloud Log Collector :

sudo cloud-log-collector-config-wizard

Main features are :

  • Easy deployment and maintenance
  • Automation of addition of client servers
  • Automatic and mandatory security
  • Irreversibility, ie the impossibility to modify data already transmitted

Why develop a new system ?

There are already many log management tools on the open source market. However, we find them relatively complex to implement, they require regular maintenance, and expertise.
The idea of Cloud Log Collector is not to have advanced functionality like LogsTash to interpret logs, ElasticSearch to serve as a search engine, or Kibana to have a nice graphical interface.

The idea of Cloud Log Collector is to be simple, with no complex functionality, and with security by default.

If you are looking to interpret the logs, you can still use LogsTash or any other tool directly on the logs retrieved by Cloud Log Collector!

Installation process

To install all necessary tools, in root :

npm i -g cloud-log-collector

Use the wizard to create configuration files, in root :

cloud-log-collector-config-wizard

To install server part, in root :

cloud-log-collector-install-server my_conf_file.conf

To install client part, in root :

cloud-log-collector-install-client my_conf_file.conf

If you use the magic token, to auto configure the client part, in root :

cloud-log-collector-install-client-get-token

Wizard will tell you how to install and configure the servers / clients

Wizard example

---------------------------------------------------------------
---------------------------------------------------------------
Wizard for Cloud Log Collector configuration file
---------------------------------------------------------------
Server hostname :cloud-log-collector.myserver.com
Server port (1095) :
SSL Certificate file on the server :/var/mycert.cert
SSL Certificate Key file on the server :/var/mycert.key
Folder used to store all log files on the server (/var/clc/data) :
Folder used to store client credential data on the server (/var/clc/tokens) :
Want to use a magic token ? (automatically generates token from client side at first connection) (y/n) :y
Enter magic token (empty = auto generated) :
Magic token : 68l7drd32eaazmhzr883j6ma6po9yysrdp3ltatxochc3xkgmg179fm960opti6uqx0ux1pc47sonyt6wmqyb
---------------------------------------------------------------
In order to help community, send anonymous data on system usage ? (To help future dev) (y/n) :y
---------------------------------------------------------------
Which log do you want to watch on the client ? (empty to continue) :/var/log/auth.log
Which log do you want to watch on the client ? (empty to continue) :/var/log/syslog
Which log do you want to watch on the client ? (empty to continue) :
---------------------------------------------------------------
Folder to save config file(s) (./conf) :
Once everything is configured, you should delete this folder for security reasons
---------------------------------------------------------------
---------------------------------------------------------------
Process to install Cloud Log Collector on server :
- copy './conf/server.conf' to the server in file '/as/you/want/server.conf'
- run these commands in root :
	npm i -g cloud-log-collector
	cloud-log-collector-install-server /as/you/want/server.conf
delete file '/as/you/want/server.conf'
---------------------------------------------------------------
Do you want me to install server side on this server now ? (y/n) :y

Done !
---------------------------------------------------------------
Process to install Cloud Log Collector on client without magic token :
- copy './conf/client.conf' to the server in file '/as/you/want/client.conf'
	Replace XXXSecretClientKeyXXX by your secret key in '/as/you/want/client.conf'
- run these commands :
	npm i -g cloud-log-collector
	cloud-log-collector-install-client /as/you/want/client.conf
delete file '/as/you/want/client.conf'
To get a secret client key, use the command 'cloud-log-collector-client-key-new XXXClientNameXXX' on the server after installation
To revoke a secret client key, use the command 'cloud-log-collector-client-key-revoke XXXClientNameXXX' on the server after installation
'XXXClientNameXXX' must only contain A-Za-z0-9.-_
---------------------------------------------------------------
Process to install Cloud Log Collector on client with magic token :
- copy './conf/client.conf' to the server in file '/as/you/want/client.conf'
- run these commands :
	npm i -g cloud-log-collector
	cloud-log-collector-install-client /as/you/want/client.conf
delete file '/as/you/want/client.conf'
	CLCMagicToken="My Magic Token" CLCHostname="myhostname.com" cloud-log-collector-install-client-get-token
---------------------------------------------------------------
Do you want me to install client side on this server now ? (y/n) :y
Server hostname in cloud-log-collector (could be different from hostname used to connect client and server) (a-zA-Z0-9.-_ only) :cloud-log-collector-server

Token saved in config file
Done !
Wizard end !

How it works ?

Cloud Log Collector is divided into 2 parts, a thin client running on different servers from which we want to recover the logs, and a server that centralizes all received logs.

A simple solution !

A wizard allows you to simply create configuration files for clients and servers. The installation of the system on the clients is simplified by the possible use of a magic token which allows automatic configuration of security token on client side.

We use this log system in dynamic clusters with automatic creation and destruction of servers. It was therefore essential that the installation procedures be automated.

The most paranoid users can disable the magic token feature to generate their own tokens.

What usefulness ?

In the context of cybersecurity, and in particular new regulatory obligations (GDPR, …), server logs must be saved, in order to be used in a survey, for technical, regulatory or legal reasons (forensic).

This can also be used to easily provide access to numerous logs from numerous servers !

For which platform ?

The main target platform is an heterogeneous set of servers running Linux. We developed the system using systemctl for service management.

We also operate several other types of servers (Windows, …), however, the open source version of Cloud Log Collector currently only supports natively Linux.

Interested by this type of feature? contact us !

How fast ?

The system has been designed to be deployed on thousands of servers for a single collector. In case of temporary congestion, unavailability of the log server, or network connection breakdown, the logs are stored in client-side RAM for later delivery.

What security ?

The entire system has been designed to minimize the risk of log corruption in case of corruption of one of the client servers. Even in the case of complete corruption, only logs sent from the moment the corruption is made can be corrupted. The client cannot access the data already sent.

The system requires the use of a TLS security certificate for communications between servers. We use Let’s Encrypt to generate the certificates, but you can use any certificate. We also use auto certificates generated with master certificate that we add to the certificate group recognized by the server.

Impossible to disable security ! This is part of the principles of :

  • Security by design
  • Security by default
  • Privacy by design
  • Privacy by default

What dependencies ?

Cloud Log Collector uses only 3 dependencies :

  • readline-sync, for configuration tools that require human interaction (CLI)
  • websocket, for communications between components (TLS / SSL certificate required)
  • tail-file, to detect new lines in client’s logs

Missing features for your needs ?

Contact us through our website, we can help you !