
Security News
Opengrep Adds Apex Support and New Rule Controls in Latest Updates
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
redis-smq-monitor
Advanced tools
RedisSMQ Monitor is an application which lets you monitor, debug, and manage your RedisSMQ message queue
RedisSMQ Monitor is an application which lets you monitor, debug, and manage RedisSMQ message queue.
The monitor uses and ships with RedisSMQ Monitor Client as a default Web UI client.
An HTTP API is also provided. The HTTP API
interface enables you to manage the message queue from your application using the HTTP protocol.
npm install redis-smq-common redis-smq redis-smq-monitor --save
Considerations:
The monitor configuration extends RedisSMQ Configuration with additional parameters.
'use strict';
const { ConsumerEventListener, ProducerEventListener } = require('redis-smq-monitor');
module.exports = {
namespace: 'testing',
redis: {
client: 'redis',
options: {
host: '127.0.0.1',
port: 6379,
connect_timeout: 3600000,
},
},
logger: {
enabled: true,
options: {
level: 'info',
/*
streams: [
{
path: path.normalize(`${__dirname}/../logs/redis-smq-monitor.log`)
},
],
*/
},
},
eventListeners: {
consumerEventListeners: [ConsumerEventListener],
producerEventListeners: [ProducerEventListener],
},
server: {
host: '127.0.0.1',
port: 3000,
socketOpts: {
// ...
}
}
};
Parameters
namespace
(string): Optional. See RedisSMQ Configuration.
messages
(object): Optional. See RedisSMQ Configuration.
redis
(object): Optional. See Redis Configuration for more details.
logger
(object): Optional. See Logs Configuration for more details.
eventListeners
(object): Optional. See Monitor Event Listeners.
server
(object): Optional.
server.host
(String): Optional. IP address of the monitor server. By default, 0.0.0.0
.
server.port
(Integer): Optional. Port of the monitor server. By default, 7210
.
server.basePath
(String): Optional. Let the monitor know that it is running behind a reverse proxy server and use a base path (for example /monitor
) to render links and redirects correctly. See Running the RedisSMQ Monitor behind a reverse proxy.
server.socketOpts
(Object): Optional. WebSocket parameters for socket.io
. See https://socket.io/docs/v4/server-api/#new-serverport-options for more details.
Before launching the monitor server, you should first configure RedisSMQ to use the monitor event listeners.
RedisSMQ Monitor comes with a couple of event listeners that you need to register within RedisSMQ for having such features as:
The monitor provides:
ConsumerEventListener
for handling consumers message rates.ProducerEventListener
for handling producers message rates.const { ConsumerEventListener, ProducerEventListener } = require('redis-smq-monitor');
const config = {
eventListeners: {
consumerEventListeners: [ConsumerEventListener],
producerEventListeners: [ProducerEventListener],
},
}
See RedisSMQ/Configuration for more details. See RedisSMQ/Event Listeners for more details.
Once your consumers/producers are now using the plugins, the monitor can be launched from any other process or host (as well as the host can access the Redis server) and used as shown in the example bellow:
'use strict';
const config = require('./config');
const { MonitorServer } = require('redis-smq-monitor');
const monitorServer = MonitorServer.createInstance(config);
monitorServer.listen();
To run the monitor behind a reverse proxy server you need first to configure correctly your server.
Depending on your setup, some extra steps may be required. The easiest way to start with is to serve the monitor using a transparent proxy.
I am using Nginx as a proxy server, but you can use any other server depending on your preferences.
Sample Nginx configuration:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream redis-smq {
server 127.0.0.1:3000;
}
server {
listen 5000;
listen [::]:5000;
location / {
proxy_pass http://redis-smq;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
No additional configuration is required.
Sample Nginx configuration:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream redis-smq {
server 127.0.0.1:3000;
}
server {
listen 5000;
listen [::]:5000;
location /monitor {
proxy_pass http://redis-smq;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
rewrite ^/monitor/(.*) /$1 break;
}
}
Additionally, you need to configure the basePath.
Sample configuration:
'use strict';
module.exports = {
server: {
host: '127.0.0.1',
port: 3000,
basePath: '/monitor' // <-- using the base path
}
};
7.3.1 (2023-05-04)
FAQs
RedisSMQ Monitor is an application which lets you monitor, debug, and manage your RedisSMQ message queue
The npm package redis-smq-monitor receives a total of 449 weekly downloads. As such, redis-smq-monitor popularity was classified as not popular.
We found that redis-smq-monitor 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 latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.