mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
confd: augment new services container to ietf-system
This patch adds operational data support for system services. The
data is in a generic format but is intended to be able to represent
finit information (initctl) nicely.
The reason for augmenting this to ietf-system and not to
infix-services is that we consider this generic system information
which is totally disconnected from what ever services infix might
provide.
In this first state we only support pid, name, description and state.
Making the data look something like:
"infix-system:services": {
"service": [
{
"pid": 1185,
"name": "udevd",
"status": "running",
"description": "Device event daemon (udev)"
}]
Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
@@ -128,6 +128,148 @@
|
||||
"os-version": "v25.04.0-rc1-3-g8daf1571-dirty",
|
||||
"os-release": "v25.04.0-rc1-3-g8daf1571-dirty",
|
||||
"machine": "x86_64"
|
||||
},
|
||||
"infix-system:services": {
|
||||
"service": [
|
||||
{
|
||||
"pid": 1185,
|
||||
"name": "udevd",
|
||||
"status": "running",
|
||||
"description": "Device event daemon (udev)"
|
||||
},
|
||||
{
|
||||
"pid": 2248,
|
||||
"name": "dbus",
|
||||
"status": "running",
|
||||
"description": "D-Bus message bus daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3039,
|
||||
"name": "confd",
|
||||
"status": "running",
|
||||
"description": "Configuration daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3548,
|
||||
"name": "netopeer",
|
||||
"status": "running",
|
||||
"description": "NETCONF server"
|
||||
},
|
||||
{
|
||||
"pid": 2249,
|
||||
"name": "dnsmasq",
|
||||
"status": "running",
|
||||
"description": "DHCP/DNS proxy"
|
||||
},
|
||||
{
|
||||
"pid": 3559,
|
||||
"name": "tty:hvc0",
|
||||
"status": "running",
|
||||
"description": "Getty on hvc0"
|
||||
},
|
||||
{
|
||||
"pid": 2340,
|
||||
"name": "iitod",
|
||||
"status": "running",
|
||||
"description": "LED daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3560,
|
||||
"name": "klishd",
|
||||
"status": "running",
|
||||
"description": "CLI backend daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3617,
|
||||
"name": "mdns-alias",
|
||||
"status": "running",
|
||||
"description": "mDNS alias advertiser "
|
||||
},
|
||||
{
|
||||
"pid": 0,
|
||||
"name": "mstpd",
|
||||
"status": "stopped",
|
||||
"description": "Spanning Tree daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3564,
|
||||
"name": "rauc",
|
||||
"status": "running",
|
||||
"description": "Software update service"
|
||||
},
|
||||
{
|
||||
"pid": 0,
|
||||
"name": "resolvconf",
|
||||
"status": "done",
|
||||
"description": "Update DNS configuration"
|
||||
},
|
||||
{
|
||||
"pid": 3472,
|
||||
"name": "statd",
|
||||
"status": "running",
|
||||
"description": "Status daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3653,
|
||||
"name": "staticd",
|
||||
"status": "running",
|
||||
"description": "Static routing daemon"
|
||||
},
|
||||
{
|
||||
"pid": 2241,
|
||||
"name": "syslogd",
|
||||
"status": "running",
|
||||
"description": "System log daemon"
|
||||
},
|
||||
{
|
||||
"pid": 2242,
|
||||
"name": "watchdogd",
|
||||
"status": "running",
|
||||
"description": "System watchdog daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3587,
|
||||
"name": "zebra",
|
||||
"status": "running",
|
||||
"description": "Zebra routing daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3616,
|
||||
"name": "mdns",
|
||||
"status": "running",
|
||||
"description": "Avahi mDNS-SD daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3618,
|
||||
"name": "chronyd",
|
||||
"status": "running",
|
||||
"description": "Chrony NTP v3/v4 daemon"
|
||||
},
|
||||
{
|
||||
"pid": 3633,
|
||||
"name": "lldpd",
|
||||
"status": "running",
|
||||
"description": "LLDP daemon (IEEE 802.1ab)"
|
||||
},
|
||||
{
|
||||
"pid": 3635,
|
||||
"name": "nginx",
|
||||
"status": "running",
|
||||
"description": "Web server"
|
||||
},
|
||||
{
|
||||
"pid": 3636,
|
||||
"name": "rousette",
|
||||
"status": "running",
|
||||
"description": "RESTCONF server"
|
||||
},
|
||||
{
|
||||
"pid": 3641,
|
||||
"name": "sshd",
|
||||
"status": "running",
|
||||
"description": "OpenSSH daemon"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,401 @@
|
||||
[
|
||||
{
|
||||
"identity": "udevd",
|
||||
"description": "Device event daemon (udev)",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/usr/lib/finit/system/10-hotplug.conf",
|
||||
"command": "udevd $UDEVD_ARGS",
|
||||
"environment": "-/etc/default/udevd",
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/udevd.pid",
|
||||
"pid": 1185,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1390,
|
||||
"runlevels": [ "S", 1, 2, 3, 4, 5, 7, 8, 9 ]
|
||||
},
|
||||
{
|
||||
"identity": "dbus",
|
||||
"description": "D-Bus message bus daemon",
|
||||
"type": "service",
|
||||
"forking": true,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/dbus.conf",
|
||||
"command": "/usr/bin/dbus-daemon --nofork --system --syslog-only",
|
||||
"condition": [ "+pid/syslogd" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/messagebus.pid",
|
||||
"pid": 2248,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1390,
|
||||
"runlevels": [ "S", 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||
},
|
||||
{
|
||||
"identity": "confd",
|
||||
"description": "Configuration daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/confd.conf",
|
||||
"command": "sysrepo-plugind -f -p /run/confd.pid -n -v warning",
|
||||
"condition": [ "+run/bootstrap/success" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/confd.pid",
|
||||
"pid": 3039,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1390,
|
||||
"runlevels": [ "S", 1, 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "netopeer",
|
||||
"description": "NETCONF server",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/confd.conf",
|
||||
"command": "netopeer2-server -F -t $CONFD_TIMEOUT -v 1",
|
||||
"environment": "/etc/default/confd",
|
||||
"condition": [ "+pid/confd" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/netopeer2-server.pid",
|
||||
"pid": 3548,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 1, 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "dnsmasq",
|
||||
"description": "DHCP/DNS proxy",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/dnsmasq.conf",
|
||||
"command": "dnsmasq -k -u root",
|
||||
"condition": [ "+pid/syslogd" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/dnsmasq.pid",
|
||||
"pid": 2249,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1390,
|
||||
"runlevels": [ "S", 1, 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "tty:hvc0",
|
||||
"description": "Getty on hvc0",
|
||||
"type": "tty",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/getty.conf",
|
||||
"command": "/usr/libexec/finit/getty -p hvc0 0 xterm",
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 3559,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 1, 2, 3, 4, 5, 7, 8, 9 ]
|
||||
},
|
||||
{
|
||||
"identity": "iitod",
|
||||
"description": "LED daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/iitod.conf",
|
||||
"command": "iitod",
|
||||
"condition": [ "+usr/product", "+usr/led" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 2340,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1390,
|
||||
"runlevels": [ "S", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||
},
|
||||
{
|
||||
"identity": "klishd",
|
||||
"description": "CLI backend daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/klish.conf",
|
||||
"command": "/usr/bin/klishd -d",
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 3560,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "mdns-alias",
|
||||
"description": "mDNS alias advertiser ",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/mdns-alias.conf",
|
||||
"command": "mdns-alias $MDNS_ALIAS_ARGS",
|
||||
"environment": "-/etc/default/mdns-alias",
|
||||
"condition": [ "+service/mdns/running" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 3617,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "mstpd",
|
||||
"description": "Spanning Tree daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "stopped",
|
||||
"exit": { "code": 0 },
|
||||
"origin": "/etc/finit.d/enabled/mstpd.conf",
|
||||
"command": "mstpd $MSTPD_ARGS",
|
||||
"environment": "-/etc/default/mstpd",
|
||||
"starts": 0,
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 0,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 0,
|
||||
"runlevels": [ "S", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||
},
|
||||
{
|
||||
"identity": "rauc",
|
||||
"description": "Software update service",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/rauc.conf",
|
||||
"command": "rauc service $RAUC_ARGS",
|
||||
"environment": "-/etc/default/rauc",
|
||||
"condition": [ "+service/dbus/running" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 3564,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "resolvconf",
|
||||
"description": "Update DNS configuration",
|
||||
"type": "task",
|
||||
"forking": false,
|
||||
"status": "done",
|
||||
"exit": { "code": 0 },
|
||||
"origin": "/etc/finit.d/enabled/resolvconf.conf",
|
||||
"command": "resolvconf -u",
|
||||
"condition": [ "+usr/bootstrap" ],
|
||||
"restarts": 2,
|
||||
"pidfile": "none",
|
||||
"pid": 0,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 0,
|
||||
"runlevels": [ "S", 1, 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "statd",
|
||||
"description": "Status daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/statd.conf",
|
||||
"command": "statd -f -p /run/statd.pid -n",
|
||||
"condition": [ "+pid/confd" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/statd.pid",
|
||||
"pid": 3472,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1389,
|
||||
"runlevels": [ "S", 1, 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "staticd",
|
||||
"description": "Static routing daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/staticd.conf",
|
||||
"command": "staticd -A 127.0.0.1 -u frr -g frr -f /etc/frr/staticd.conf",
|
||||
"condition": [ "+pid/zebra" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/frr/staticd.pid",
|
||||
"pid": 3653,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "syslogd",
|
||||
"description": "System log daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/sysklogd.conf",
|
||||
"command": "syslogd -F $SYSLOGD_ARGS",
|
||||
"environment": "-/etc/default/sysklogd",
|
||||
"condition": [ "+run/udevadm:post/success" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/syslogd.pid",
|
||||
"pid": 2241,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1390,
|
||||
"runlevels": [ "S", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||
},
|
||||
{
|
||||
"identity": "watchdogd",
|
||||
"description": "System watchdog daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/watchdogd.conf",
|
||||
"command": "watchdogd -xns $WATCHDOGD_ARGS",
|
||||
"environment": "-/etc/default/watchdogd",
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/watchdogd/pid",
|
||||
"pid": 2242,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1390,
|
||||
"runlevels": [ "S", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
|
||||
},
|
||||
{
|
||||
"identity": "zebra",
|
||||
"description": "Zebra routing daemon",
|
||||
"type": "service",
|
||||
"forking": true,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/zebra.conf",
|
||||
"command": "zebra $ZEBRA_ARGS",
|
||||
"environment": "-/etc/default/zebra",
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/frr/zebra.pid",
|
||||
"pid": 3587,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "mdns",
|
||||
"description": "Avahi mDNS-SD daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/avahi.conf",
|
||||
"command": "avahi-daemon -s $AVAHI_ARGS",
|
||||
"environment": "-/etc/default/avahi",
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 3616,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "chronyd",
|
||||
"description": "Chrony NTP v3/v4 daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/chronyd.conf",
|
||||
"command": "chronyd -n $CHRONY_ARGS",
|
||||
"environment": "-/etc/default/chronyd",
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/chrony/chronyd.pid",
|
||||
"pid": 3618,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "lldpd",
|
||||
"description": "LLDP daemon (IEEE 802.1ab)",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/lldpd.conf",
|
||||
"command": "lldpd -d $LLDPD_ARGS",
|
||||
"environment": "-/etc/default/lldpd",
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 3633,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "nginx",
|
||||
"description": "Web server",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/nginx.conf",
|
||||
"command": "nginx -g 'daemon off;' $NGINX_ARGS",
|
||||
"environment": "-/etc/default/nginx",
|
||||
"condition": [ "+usr/mkcert" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/nginx.pid",
|
||||
"pid": 3635,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "rousette",
|
||||
"description": "RESTCONF server",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/restconf.conf",
|
||||
"command": "rousette --syslog -t $CONFD_TIMEOUT",
|
||||
"environment": "/etc/default/confd",
|
||||
"condition": [ "+pid/confd" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "none",
|
||||
"pid": 3636,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 1, 2, 3, 4, 5 ]
|
||||
},
|
||||
{
|
||||
"identity": "sshd",
|
||||
"description": "OpenSSH daemon",
|
||||
"type": "service",
|
||||
"forking": false,
|
||||
"status": "running",
|
||||
"origin": "/etc/finit.d/enabled/sshd.conf",
|
||||
"command": "/usr/sbin/sshd -D $SSHD_OPTS",
|
||||
"environment": "-/etc/default/sshd",
|
||||
"condition": [ "+pid/syslogd" ],
|
||||
"restarts": 0,
|
||||
"pidfile": "/run/sshd.pid",
|
||||
"pid": 3641,
|
||||
"user": "root",
|
||||
"group": "root",
|
||||
"uptime": 1388,
|
||||
"runlevels": [ 2, 3, 4, 5 ]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user