Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

agentx

Package Overview
Dependencies
Maintainers
2
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agentx - npm Package Compare versions

Comparing version 1.7.3 to 1.8.0

26

lib/orders/disk_usage.js

@@ -13,2 +13,5 @@ 'use strict';

exports.run = function (callback) {
// '/dev/sda6 14674404 13161932 744012 95% /'
// '/dev/sda3 80448976 67999076 8340248 90% /home/admin/'
helper.execFile(command, function (err, stdout) {

@@ -18,20 +21,23 @@ if (err) {

}
var metric = {};
var results = stdout.trim();
var lines = results.split('\n');
var root = lines.filter(function (line) {
return line.match(/\/$/ig);
}).join('');
lines.forEach(function(line) {
if (line.match(/^\//)) {
var match = line.match(/(\d+)%\s+(\/.*$)/);
if (match) {
metric[match[2]] = parseInt(match[1] || 0);
}
}
});
// '/dev/disk1 487849760 454136600 33201160 94% /'
metric['used_percent'] = metric['/'] || 0;
var percent = root.match(/(\d+)%/);
callback(null, {
type: 'disk_usage',
metrics: {
'used_percent': parseInt(percent && percent[1]) || 0
}
metrics: metric
});
});
};
exports.reportInterval = 5 * 60 * 1000; // 5 minutes
{
"name": "agentx",
"version": "1.7.3",
"version": "1.8.0",
"description": "agentx is powered by alinode",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc