Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
express-monitoring
Advanced tools
Readme
Package allows to define custom monitoring controls (rules) and execute them using express handlers.
This NodeJS adaptation of Horat1us/yii2-monitoring package for PHP.
Written on Typescript.
Using NPM:
npm i express-monitoring
You need to define your own Control or use one of pre-defined. Then, just create Controller instance and add it to routes.
// region Monitoring Controller Definition
// This should be placed to separate file
import * as monitoring from "express-monitoring";
// can also be async or return promise
const SomeControl: monitoring.Control = () => {
// check for something
const isSuccessful = false;
if (!isSuccessful) {
throw new monitoring.FailureError(
"Something goes wrong.",
0, // error code
{}, // details, optional
"NotSuccessful" // string error type
);
}
return {}; // you also may return details
};
let controls = {
"controlID": SomeControl,
};
const Monitoring = new monitoring.Controller(controls);
// endregion
import * as express from "express";
const app = express();
const port = 3000;
app.get('/monitoring/:id', Monitoring.control); // route to check controls separately
app.get('/monitoring/full', Monitoring.full); // route to check all controls by one request
app.listen(3000, () => `Monitoring app listening on port ${port}`);
Then you can make request GET http://localhost:3000/monitoring/controlID
.
For response examples see Documentation.
FAQs
Express Monitoring
The npm package express-monitoring receives a total of 8 weekly downloads. As such, express-monitoring popularity was classified as not popular.
We found that express-monitoring 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.