agentless_monitor 1.0.0 copy "agentless_monitor: ^1.0.0" to clipboard
agentless_monitor: ^1.0.0 copied to clipboard

Monitor 1000+ servers without installing any agent. Uses SSH, SNMP, and REST API protocols to collect CPU, RAM, Disk, Network, Process and Service metrics. Auto-discovers new hosts in CIDR subnets. Ze [...]

agentless_monitor #

Monitor 1000+ servers without installing any agent.
SSH · SNMP · REST API · Auto-Discovery · Real-time Alerts · Pure Dart

Pub Version License: MIT Dart SDK


Why agentless_monitor? #

Pain point Traditional agent-based monitoring agentless_monitor
Setup time Install agent on each server (days/weeks) Seconds — just add credentials
Agent overhead 50–200 MB RAM per host Zero — reads /proc via SSH
Windows/network devices Agent often incompatible SNMP works everywhere
New VMs auto-discovered Manual registration ✅ Automatic CIDR scanning
Dart/Flutter SDK Not available ✅ First-class support

Installation #

# pubspec.yaml
dependencies:
  agentless_monitor: ^1.0.0
dart pub get

Quick Start — 5 lines #

import 'package:agentless_monitor/agentless_monitor.dart';

final monitor = AgentlessMonitor();

monitor.addTarget('192.168.1.0/24', TargetConfig(
  via: [Protocol.ssh, Protocol.snmp],
  interval: Duration(seconds: 30),
  discover: DiscoveryMode.auto,
  ssh: SshAuthConfig.keyFile(username: 'admin', keyPath: '~/.ssh/id_rsa'),
  snmp: SnmpConfig.v2c(community: 'public'),
));

monitor.metricsStream.listen((r) =>
  print('${r.host}: CPU=${r.cpu?.usagePercent.toStringAsFixed(1)}% '
        'RAM=${r.ram?.usagePercent.toStringAsFixed(1)}%'));

await monitor.start();

Feature Overview #

Protocols #

Protocol Works with Metrics
SSH Linux, Unix, macOS CPU (/proc/stat), RAM (/proc/meminfo), Disk (df), Network (/proc/net/dev), Processes, Services
SNMP v1/v2c/v3 Windows, Cisco, Juniper, VMware ESXi, any SNMP device CPU, RAM, Disk, Interfaces, Processes, Custom OIDs
REST API Prometheus node_exporter, Docker, Kubernetes, custom endpoints Any JSON metric, Prometheus exposition format

Auto-Discovery #

monitor.addTarget('10.0.0.0/16', TargetConfig(
  discover: DiscoveryMode.auto,   // Scans subnet every 5 min
  via: [Protocol.ssh, Protocol.snmp],
  ssh: SshAuthConfig.password(username: 'ops', password: 's3cr3t'),
));

monitor.discoveryStream.listen((d) =>
  print('🆕 New host: ${d.host} (${d.deviceType.name})'));

Alerts #

// Use built-in presets (CPU > 80/95%, RAM > 80/90%, Disk > 80/90%, etc.)
monitor.useDefaultAlertRules();

// Or define your own
monitor.addAlertRule(AlertRule(
  id: 'db_cpu_hot',
  name: 'DB CPU > 70%',
  metric: MetricType.cpu,
  operator: CompareOperator.greaterThan,
  threshold: 70.0,
  severity: AlertSeverity.warning,
  forDuration: Duration(minutes: 5),   // Anti-flap hysteresis
  hostFilter: '10.0.1.*',             // Only DB servers
));

monitor.alertsStream.listen((alert) =>
  print('[${alert.severity.name}] ${alert.host}: ${alert.message}'));

Target Config Presets #

// Linux server
TargetConfig.linux(ssh: SshAuthConfig.keyFile(username: 'admin', keyPath: '~/.ssh/id_rsa'))

// Windows Server
TargetConfig.windows(snmp: SnmpConfig.v2c(community: 'public'))

// Cisco / Juniper router
TargetConfig.networkDevice(snmp: SnmpConfig.v2c(community: 'private'))

// VMware ESXi
TargetConfig.esxi(snmp: SnmpConfig.v2c(community: 'public'))

// Cloud VM (Prometheus node_exporter)
TargetConfig.cloudVm(api: ApiAuthConfig.prometheus(baseUrl: 'http://10.0.0.5:9100'))

History & Aggregation #

// Latest snapshot
final latest = monitor.getLatestResult('10.0.0.5');

// Last 1-hour trend
final history = monitor.getHistory('10.0.0.5', period: Duration(hours: 1));

// Average CPU over an hour
final agg = MetricAggregator();
final avgCpu = agg.avgCpu('10.0.0.5', period: Duration(hours: 1));
final peakCpu = agg.peakCpu('10.0.0.5');

Architecture #

AgentlessMonitor (singleton engine)
│
├── TargetRegistry      — host registration + state tracking
├── MonitorScheduler    — per-host periodic timers
├── AutoDiscoveryEngine — CIDR scanning + port probing
│
├── SshCollector        — /proc/** reads via dartssh2
├── SnmpCollector       — GetBulk via dart_snmp
├── ApiCollector        — HTTP/REST via package:http
│
├── MetricAggregator    — circular in-memory time-series
├── AlertManager        — threshold evaluation + hysteresis
└── AlertHistory        — queryable event log

Reactive Streams #

Stream Type Description
metricsStream Stream<MonitorResult> Every poll result
alertsStream Stream<AlertEvent> Alert fires / resolves
discoveryStream Stream<DiscoveryResult> New hosts found
statesStream Stream<Map<String, TargetState>> Full fleet state after each cycle

Configuration #

AgentlessMonitor(config: MonitorConfig(
  maxConcurrency: 200,            // Parallel SSH/SNMP workers
  connectionTimeout: Duration(seconds: 10),
  globalRetryCount: 3,
  enableDiscovery: true,
  discoveryInterval: Duration(minutes: 5),
  persistMetrics: false,          // Set true for Hive persistence
  maxHistorySize: 1440,           // 24h at 1-min intervals
  logLevel: 2,                    // 0=none … 4=verbose
));

Running Tests #

# All unit tests
dart test test/unit/

# Specific test file
dart test test/unit/cidr_parser_test.dart

# With coverage report
dart test --coverage=coverage/
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info

Pricing Model (SaaS tier suggestions) #

Plan Max Hosts Suggested Price
Free 25 $0
Starter 100 $50 / month
Pro 500 $200 / month
Enterprise Unlimited $0.50 / host / month

Formula: max(0, hosts − 25) × $0.50 / month


Comparison #

Feature agentless_monitor Zabbix Datadog CheckMK
Agent required ❌ Never ✅ For most ✅ Required ✅ Required
Setup time Minutes Days Hours Days
SSH support ✅ Full ⚠️ Limited
SNMP v1/v2c/v3 ⚠️
Dart/Flutter SDK
Open source ✅ MIT ✅ GPL ⚠️ Community
1000 hosts cost ~$487/mo Free (self-host) ~$2000/mo ~$3000/mo

File Structure #

agentless_monitor/
├── lib/
│   ├── agentless_monitor.dart        ← Single import barrel
│   └── src/
│       ├── core/                     ← Engine, config, result, scheduler
│       ├── targets/                  ← Registry, config, state, groups
│       ├── protocols/
│       │   ├── ssh/                  ← Connector, collector, commands, pool
│       │   ├── snmp/                 ← Connector, collector, OID lib, v3, traps
│       │   └── api/                  ← Connector, collector, auth, parser
│       ├── discovery/                ← Auto engine, scanner, prober, result
│       ├── metrics/                  ← CPU, RAM, Disk, Network, Process, Service
│       ├── alerts/                   ← Rule, manager, event, evaluator, history
│       ├── storage/                  ← MetricsStore, TimeSeries, Snapshots
│       └── utils/                    ← CIDR, intervals, retry, pool, logger
├── test/unit/                        ← 7 test files, ~100 test cases
├── example/bin/cli_example.dart      ← Terminal dashboard
├── example/lib/main.dart             ← Flutter widget example
├── CHANGELOG.md
├── LICENSE                           ← MIT
└── README.md

License #

MIT © 2026 agentless_monitor contributors

0
likes
130
points
156
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Monitor 1000+ servers without installing any agent. Uses SSH, SNMP, and REST API protocols to collect CPU, RAM, Disk, Network, Process and Service metrics. Auto-discovers new hosts in CIDR subnets. Zero setup. Production-ready, pub.dev-ready, MIT licensed.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

async, collection, cron, equatable, freezed_annotation, hive, json_annotation, retry, stream_transform

More

Packages that depend on agentless_monitor