Gathering detailed insights and metrics for uriel
Gathering detailed insights and metrics for uriel
Gathering detailed insights and metrics for uriel
Gathering detailed insights and metrics for uriel
A NodeJS statsd agent to push memory, cpu, network, swap, diskio, and disk usage.
npm install uriel
Typescript
Module System
Node Version
NPM Version
JavaScript (99.22%)
Dockerfile (0.78%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
5 Stars
161 Commits
1 Forks
2 Watchers
10 Branches
1 Contributors
Updated on May 15, 2025
Latest Version
2.1.0
Package Id
uriel@2.1.0
Unpacked Size
80.78 kB
Size
21.53 kB
File Count
49
NPM Version
6.14.11
Node Version
14.16.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A simple service that pushes system information (e.g. system usage, memory, cpu, network, swap, diskio, and disk usage) to any compatible statsd service (e.g. StatsD, Telegraf, DogStatsD, etc.)
Note: Version 2.0.0 contains breaking changes to how some statistics are delivered to the statsd server, and how the Uriel process is configured. Please consult the documentation for information on these breakages.
Uriel
is designed to be a lightweight NodeJS agent that gathers system information and delivers it to a compatible statsd service over UDP. It can be embedded within another service, or setup and configured as its own stand-alone service that runs on the system being monitored. At the time of creation, other NodeJS systeminfo agents were unsuitable due to their inflexibility or poor implementations. Uriel was created to (ideally) bridge those shortcomings. It uses UDP, because of the decreased network overhead that is required in comparison to TCP.
The name Uriel is associated with Abrahamic religions for the Archangel which represents the light of the divine and as one who had dominion over another type of angel, the Gregori (a.k.a. The Watchers). The name was chosen both because of its association with illuminating dark places and watching things which are two abstract concepts related to system monitoring.
So that grouped dashboards are possible, version 2.x moves CPU and Disk Usage reporting for individual cpu/disks and the aggregate totals into tagged metrics. Any dashboards which rely on this reporting will need to be updated as follows:
cpu:total
or disk:total
respectively.cpu.cpu0_usage_idle
/ disk.disk0_free
to cpu.usage_idle
/ disk.free
with tags cpu:0
/ disk:0
.It is also now possible to configure global tags which are sent for all metrics in the server configuration. These are setup with the statsd.tags
array of the server configuration. This allows for
systems being monitored in auto-scaling groups or under load-balancing to be grouped together by shared tags in dashboards. This is especially useful under architectures where the exact specification (size/number of systems/etc.) is mutable.
The Uriel service has three modes of operation:
The stand-alone service option is available when it is desirable to use new/existing server architecture and more control over the environment is required.
To install, clone the git repository:
$ git clone https://github.com/OutOfSyncStudios/uriel.git
$ cd uriel
To configure, run:
1npm run config
This will ask a series of questions which provides the base configuration. Alternatively, it is possible to manually edit the <uriel-base>/config/config.js
file to make adjustments. The configuration file is an exported version of the Configuration Object.
Before running, ensure that a compatible statsd service is configured to listen for events on the configured port and the any firewall rules are open between the service and the statsd service. All operations below should be performed from the Uriel base folder.
Note: When using stand-alone mode, it is recommended that a process manager, such as PM2, be used. Regardless of how the service is run, proper startup scripts will be needed to ensure that Uriel restarts whenever the server is rebooted.
1$ node app.js
It is possible to pass an external configuration file.
1$ node app.js -c <fullpath to config file>
1$ pm2 start app.js -n "Uriel" -i 1
1$ pm2 start app.js -n "Uriel" -i 1 -- -c <fullpath to config file>
To install, clone the git repository:
$ git clone https://github.com/OutOfSyncStudios/uriel.git
$ cd uriel
To configure, run:
1npm run config
This will ask a series of questions which provides the base configuration. Alternatively, it is possible to manually edit the <uriel-base>/config/config.js
file to make adjustments. The configuration file is an exported version of the Configuration Object.
Before running, ensure that a compatible statsd service is configured to listen for events on the configured port and the any firewall rules are open between the service and the statsd service.
1$ npm run docker-build
1$ npm run docker-run
The embedded option is available if including the service bundled as a part of another service is desired.
1$ npm install uriel
Within a library or application, add the following code:
1 const Uriel = require('uriel'); 2 3 // Create a new agent 4 let statsd = new Uriel(config, logger); 5 6 // Initialize and start the uriel agent 7 statsd.init(); 8 9 // close and shutdown the uriel agent 10 statsd.close();
Note: The same considerations for firewall rules must be made when running the Uriel service in embedded mode.
Create a new Uriel agent.
1const Uriel = require('uriel'); 2 3let statsd = new Uriel(config, logger);
Where the config
and logger
parameters are as outlined below. The logger
is optional, and if no logger is provided then all logging is sent to /dev/null
.
Initializes and starts the Uriel statsD agent
1statsd.init();
Shuts down the Uriel StatsD agent. Because the agent maintains an active thread, this operation must be performed to allow the application to gracefully shut down.
1statsd.close();
The configuration parameter expects and object that contains the following (with defaults provided below):
1{ 2 server: { 3 shutdownTime: 1000, 4 pollingTimer: 5000 5 }, 6 logging: { 7 // Logging Configuration 8 logDir: './logs', 9 options: { json: false, maxsize: '10000000', maxFiles: '10', level: 'silly' } 10 }, 11 statsd: { 12 host: '127.0.0.1', 13 port: '8125', 14 name: 'Uriel', 15 attachHostName: false, 16 telegraf: false, 17 tags: [] 18 } 19}
parameter | type | description |
---|---|---|
server.shutdownTime | Integer | Time in millisecond to allow for graceful shutdown |
server.pollingTime | Integer | Time in millisecond to wait between polling the system information and delivering to statsd |
logging.logDir | Integer | The full or relative path (from the Uriel base folder to store logs |
logging.options.json | Boolean | Store Uriel service events in JSON format |
logging.options.maxsize | Integer String | Max logfile size in bytes before logrotation |
logging.options.maxFiles | Integer String | Max number of rotated logfiles to keep for logrotation |
logging.options.level | String | The lowest log level to store in files (silly,debug,info,warn,error) |
statsd.host | String | IP/Domain of the statsd server for this configuration |
statsd.port | Integer | UDP Port that handles the system information |
statsd.name | String | the serverName tag that is provided for all stats that are pushed. This allows info from differing servers to be distinguished from one another |
statsd.attachHostName | Boolean | true or false value that specifies that the os hostname should be appended to the serverName |
statsd.telegraf | Boolean | true or false value that specifies that the listening server is running telegraf |
statsd.tags | Array | An array of tag strings formatted key:value that are passed onto the statsd server |
The Logging object is an instance of any logging library, such as Winston or Bunyan, which support the .error(...)
, .info(...)
, .debug(...)
, and .log(...)
methods. When in stand-alone mode, the service will use the configuration values to create an instance of Winston.
The following buckets are used to capture statistics:
name | domain | description |
---|---|---|
system.uptime | System | System uptime |
system.load1 | System | System 1-minute average load |
system.load5 | System | System 5-minute average load |
system.load15 | System | System 15-minute average load |
cpu.usage_user | CPU | % of CPU usage from user processes |
cpu.usage_nice | CPU | % of CPU usage from low-priority/background processes |
cpu.usage_system | CPU | % of CPU usage from system/kernel processes |
cpu.usage_idle | CPU | % of CPU idle |
cpu.usage_irq | CPU | % of CPU usage from system IRQs |
cpu.usage_total | CPU | % of non-idle CPU usage |
cpu.num_cpus | CPU | Count of CPUs on the system |
mem.free | Memory | Free Memory (in bytes) |
mem.free_percent | Memory | % of Free Memory |
mem.total | Memory | Total Memory (in bytes) |
mem.used | Memory | Used Memory (in bytes) |
mem.used_percent | Memory | % of Used Memory |
network.close_wait | Network | Count of network packets in CLOSED_WAIT state |
network.foreign | Network | Count of network packets in FOREIGN state |
network.established | Network | Count of network packets in ESTABLISHED state |
network.last_ack | Network | Count of network packets in LAST_ACK state |
network.listen | Network | Count of network packets in LISTEN state |
network.syn_sent | Network | Count of network packets in SYN_SENT state |
network.time_wait | Network | Count of network packets in TIME_WAIT state |
diskio.io_time | Disk I/O | Current time spent doing I/O (in milliseconds) (1s = 100% load) |
diskio.iops_in_progress | Disk I/O | Count of current number of disk operations |
diskio.weighted_io_time | Disk I/O | Measure of both I/O completion and estimated backlog |
diskio.read_bytes | Disk I/O | Total number of bytes read from disk |
diskio.read_time | Disk I/O | Total I/O time (1/100th of seconds) for read requests to disk |
diskio.write_bytes | Disk I/O | Total number of bytes written to disk |
diskio.write_time | Disk I/O | Total I/O time (1/100th of seconds) for write requests to disk |
disk.free | Disk Usage | Free Disk (in bytes) |
disk.free_percent | Disk Usage | % of Free Disk |
disk.total | Disk Usage | Total Disk (in bytes) |
disk.used | Disk Usage | Used Disk (in bytes) |
disk.used_percent | Disk Usage | % of Used Disk |
disk.num_disks | Disk Usage | Count of Disks in the system |
swap.free | Swap Usage | Free Swap (in bytes) |
swap.free_percent | Swap Usage | % of Free Swap |
swap.total | Swap Usage | Total Swap (in bytes) |
swap.used | Swap Usage | Used Swap (in bytes) |
swap.used_percent | Swap Usage | % of Used Swap |
Note: CPU or Disk Usage are delivered as tagged sets, with the 'cpu' and 'disk' tags respectively to mark the individual cpu or disk numbers or the 'total' for the aggregation of all cpus or disks.
Note: This is a major version change that contains breaking changes to the old function & reporting. Please review the documentation for updates to how data is now reported.
cpu
and disk
tags provide enumerate each of the individual cpus and disks; or have the tag value total
to indicate the aggregation of all items.silly
level logging.tags
configuration array so that other metrics may be hard passed to statsdCopyright © 2017-2019 Jay Reardon Copyright © 2019-2021 Out of Sync Studios LLC -- Licensed under the MIT license.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
36 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More