@glassmkr/crucible 0.10.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,6 +41,13 @@ export interface Snapshot {
41
41
  reboot_evidence?: RebootEvidence;
42
42
  /** Hardware RAID controllers scraped via vendor CLIs. */
43
43
  hardware_raid?: HardwareRaidSnapshot;
44
+ /** Per-process FD scan (top-50 consumers + RLIMIT_NOFILE). */
45
+ process_fd?: ProcessFdSnapshot;
46
+ /** LACP / bonding driver state from /proc/net/bonding. */
47
+ bonding?: BondingSnapshot;
48
+ /** TCP segment / retransmit / listen-queue counters from
49
+ * /proc/net/snmp + /proc/net/netstat. */
50
+ tcp_stats?: TcpStatsSnapshot;
44
51
  }
45
52
  export interface EdacDimm {
46
53
  /** dimm_label (vendor-defined string, e.g. "CPU1_DIMM_A1"). */
@@ -131,6 +138,93 @@ export interface ConntrackData {
131
138
  count: number;
132
139
  max: number;
133
140
  percent: number;
141
+ /** C9 (2026-05-19): cumulative insert_failed counter (sum across CPUs)
142
+ * from /proc/net/stat/nf_conntrack. Optional because pre-0.11.0
143
+ * agents omit it. */
144
+ insert_failed_total?: number;
145
+ /** C9: cumulative drop counter from /proc/net/stat/nf_conntrack. */
146
+ drop_total?: number;
147
+ /** Per-second insert_failed rate over the most recent snapshot
148
+ * interval. Null on first snapshot, on counter reset, or when the
149
+ * stat file is unavailable. */
150
+ insert_failed_rate_per_sec?: number | null;
151
+ drop_rate_per_sec?: number | null;
152
+ }
153
+ export interface ProcessFdEntry {
154
+ pid: number;
155
+ comm: string;
156
+ fd_count: number;
157
+ rlimit_nofile_soft: number;
158
+ rlimit_nofile_hard: number;
159
+ /** fd_count / rlimit_nofile_soft * 100, rounded to one decimal. Zero
160
+ * when soft limit is unlimited (no useful proximity signal). */
161
+ percent_of_soft_limit: number;
162
+ }
163
+ export interface ProcessFdSnapshot {
164
+ available: boolean;
165
+ reason?: string;
166
+ /** Top 50 processes by fd_count. */
167
+ top_consumers: ProcessFdEntry[];
168
+ /** Number of numeric /proc/<pid> entries we considered. */
169
+ total_processes_scanned: number;
170
+ /** Aggregate signal: max percent_of_soft_limit across top_consumers.
171
+ * Null when top_consumers is empty. */
172
+ highest_percent_of_limit: number | null;
173
+ }
174
+ export interface BondSlave {
175
+ name: string;
176
+ mii_status: string;
177
+ link_failure_count: number;
178
+ permanent_hw_addr: string;
179
+ aggregator_id: number | null;
180
+ partner_churn_state: string | null;
181
+ partner_lacp_port_state: number | null;
182
+ /** Convenience flag derived from the LACP port-state bitfield's
183
+ * synchronization bit (bit 3, 0x08). Null when the bond is not
184
+ * LACP or partner state was not captured. */
185
+ partner_lacp_synchronized: boolean | null;
186
+ }
187
+ export interface BondAggregator {
188
+ id: number;
189
+ number_of_ports: number;
190
+ actor_key: number | null;
191
+ partner_key: number | null;
192
+ partner_mac_address: string | null;
193
+ }
194
+ export interface Bond {
195
+ name: string;
196
+ mode: string;
197
+ is_lacp: boolean;
198
+ lacp_rate: string | null;
199
+ slaves: BondSlave[];
200
+ /** Equal to slaves.length; surfaces the "configured" port count
201
+ * alongside active_aggregator.number_of_ports so the dashboard can
202
+ * compute a shortfall. */
203
+ configured_port_count: number;
204
+ active_aggregator: BondAggregator | null;
205
+ }
206
+ export interface BondingSnapshot {
207
+ available: boolean;
208
+ reason?: string;
209
+ bonds: Bond[];
210
+ }
211
+ export interface TcpStatsSnapshot {
212
+ available: boolean;
213
+ reason?: string;
214
+ out_segs_total?: number;
215
+ retrans_segs_total?: number;
216
+ in_segs_total?: number;
217
+ /** Retransmits divided by segments sent over the most recent
218
+ * interval. Range 0.0 - 1.0. Null on first snapshot or counter
219
+ * reset. Zero when no outbound traffic in the interval. */
220
+ retrans_ratio?: number | null;
221
+ retrans_rate_per_sec?: number | null;
222
+ /** Optional listen-queue counters from /proc/net/netstat TcpExt.
223
+ * Absent when /proc/net/netstat is not readable. */
224
+ listen_overflows_total?: number;
225
+ listen_drops_total?: number;
226
+ listen_overflows_rate_per_sec?: number | null;
227
+ listen_drops_rate_per_sec?: number | null;
134
228
  }
135
229
  export interface SystemdData {
136
230
  failed_units: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glassmkr/crucible",
3
- "version": "0.10.4",
3
+ "version": "0.11.0",
4
4
  "description": "Lightweight bare metal server monitoring. IPMI, SMART, OS, network. Opinionated alerts.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",