NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
177 stars 95 forks source link

List of IPv4 addesses as part of the "system" endpoint #906

Open btrnka63 opened 1 year ago

btrnka63 commented 1 year ago

Hello, would you mind to add the list of IPv4 addresses (or also IPv6) into the "System" endpoint to adjust the provided info? I've managed it for my test node by this line (family == 2 means IPv4 only): sys_interfaces = RunnableNode('interfaces', method=lambda: ({inf:[adr.address for adr in data if adr.family == 2] for (inf, data) in ps.net_if_addrs().items()}, ''))

code output