profile:
name: linux-unix
inherits: [generic]
detection:
- systemctl
- root@
- journalctl
- sshd
- sudo
- ubuntu
- debian
- centos
- rocky linux
- alma linux
- red hat
- rhel
- fedora
- "kernel: linux"
- "shell: /"
- "terminal: /dev/"
- /dev/pts/
- systemd
runtime:
priority: 80
local_baseline: true
strong_signals:
- type: contains_any
values:
- ubuntu
- debian
- centos
- rocky linux
- alma linux
- red hat
- rhel
- fedora
- "kernel: linux"
- "terminal: /dev/"
- /dev/pts/
startup_prompt: unix_user_at_host_path
runtime_prompt: unix_user_at_host_path
rules:
- description: Unix prompt
regex: '(?m)^([A-Za-z0-9_.-]+)(@)([A-Za-z0-9_.-]+)(:[^#$\n]*)?([#$])'
color: f#ffffff
- description: root user
regex: '\broot\b'
color: f#ff0000 bold
- description: systemd healthy states
regex: '(?i)\b(active|running|enabled|exited|loaded)\b'
color: f#00ff00
- description: systemd fault states
regex: '(?i)\b(failed|dead)\b'
color: f#ff0000 bold
- description: systemd inactive states
regex: '(?i)\b(inactive|disabled|masked)\b'
color: f#ffff00
- description: log priority severe
regex: '(?i)\b(emerg|alert|crit|critical|error|err)\b'
color: f#ff0000 bold
- description: log priority warning
regex: '(?i)\b(warning|warn)\b'
color: f#ffff00
- description: log priority info
regex: '(?i)\b(notice|info|debug)\b'
color: f#65d7fd
- description: port
regex: '(?i)\b(tcp|udp)/(?:\d{1,4}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])\b|(?<![A-Za-z0-9_.:-])(?!(?:[01]?\d|2[0-3]):[0-5]\d\b)(?:[A-Za-z0-9_][A-Za-z0-9_.-]*+|\[[0-9A-Fa-f:.]++(?:%[A-Za-z0-9_.-]++)?\])\K:(?:\d{1,4}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])\b(?!:)'
color: f#00ffc0