
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
hfxeventstash
Advanced tools
HFXEventStash is an event store implementation for NodeJS using gRPC and Logstash.
npm install --save hfxeventstash
HFXEventStash uses gRPC and Logstash to provide an asynchronous event store.
The exposed gRPC server has an endpoint that receives a stream of events and puts on Logstash's stdin to be stored in any storage system.
You can specify proto definitions for HFXEventStash, so you can send raw protobufs to server to be parsed into JSON to send to Logstash.
We provide a full implementation of Elasticsearch as an event store, but you're free to choose any output that Logstash can handle.
HFXEventStash is configured through some environment variables and directories.
Environment Variables:
0.0.0.0:42043
.healthcheck.js
, the default value is 127.0.0.1:42043
.15000
./var/lib/hfxeventstash/protos/**/*.proto
.5000
.Directories:
To do a healthcheck on HFXEventStash you just need to run node build/healthcheck.js
, this process will return 0 if the server is healthy or 1 otherwise.
HFXEventStash gRPC server accepts the SIGINT and SIGTERM signals to gracefuly shutdown everything, it'll close the server and wait for Logstash to exit (sendin a SIGTERM) if this whole process takes more than SHUTDOWN_TIMEOUT it'll be auto-killed. Be careful with the value of SHUTDOWN_TIMEOUT if you're using in memory queue storage on Logstash, it can cause data loss.
This is the request protobuf definition of HFXEventStash server:
message StoreEventRequest {
enum EventFormat {
PROTOBUF = 0;
JSON = 1;
}
// This enum defines the format of the "data" property
EventFormat format = 1;
// A buffer with data, can be a protobuf message or a JSON string buffer
bytes data = 2;
// This can be:
// 1 - Just a label when the format is JSON
// 2 - The protobuf message's type to be parsed by HFXEventStash
string kind = 3;
// The ID of event, if you don't specify a value an UUIDv4 will be generated
string id = 4;
}
And the response is:
message StoreEventResponse {
bool success = 1;
}
We provide an standard and recommended configurations to store events in Elasticsearch, you can customize it to fit into your needs.
http://localhost:9200
to point to your Elasticsearch cluster/server.TODO
logstash.conf
docker run --rm -it -p 42043:42043 -v /path/to/your/logstash.conf:/usr/src/hfxeventstash/lib/logstash.conf gamaops/hfxeventstash:stable
node build/healthcheck.js
echo $?
Take a look at the examples folder.
import makeClient from 'hfxeventstash';
const client = makeClient({
uri: '127.0.0.1:42043' // The gRPC HFXEventStash server address
});
const addressbook = {};
const call = client.eventStash.storeEvent((error, response) => {
console.log('Error:', error);
console.log('Response:', response);
});
call.write({
format: 'JSON',
kind: 'contact.AddressBook',
data: Buffer.from(JSON.stringify(addressbook)),
});
call.end();
FAQs
A high performance event store to persist commands (CQRS)
We found that hfxeventstash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.