Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MikroTik RouterOS 'tool profile' template #1504

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ mikrotik_routeros_system_clock_print.textfsm, .*, mikrotik_routeros, [[/]]sy[[st
mikrotik_routeros_user_active_print.textfsm, .*, mikrotik_routeros, [[/]]us[[er]] ac[[tive]] p[[rint]]
mikrotik_routeros_ip_address_print.textfsm, .*, mikrotik_routeros, [[/]]ip ad[[dress]] p[[rint]]
mikrotik_routeros_ip_arp_print.textfsm, .*, mikrotik_routeros, [[/]]ip a[[rp]] p[[rint]]
mikrotik_routeros_tool_profile.textfsm, .*, mikrotik_routeros, [[/]]too[[l]] pr[[ofile]]
mikrotik_routeros_ping.textfsm, .*, mikrotik_routeros, [[/]]pin[[g]]

oneaccess_oneos_show_voice_voip-call_active_all.textfsm, .*, oneaccess_oneos, sh[[ow]] voice voip-call active
Expand Down
15 changes: 15 additions & 0 deletions ntc_templates/templates/mikrotik_routeros_tool_profile.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Value NAME (\S+)
Value CPU (\S+)
Value USAGE (\d+|\d+.\d+)

Start
^\s*NAME\s+CPU\s+USAGE\s*$$ -> ProfilingTable
^\s*$$
^. -> Error

ProfilingTable
^\s*${NAME}\s*(\s+${CPU})?\s+${USAGE}%\s*$$ -> Record
^\s*--\s+\[Q\s+quit\|D\s+dump\|C-z\s+pause\]\s*$$
^\s*--\s+\[Q\s+quit\|C-z\s+pause\]\s*$$
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
NAME CPU USAGE
spi 1%
console 0%
firewall 0.5%
networking 0%
management 0.5%
profiling 0%
unclassified 0.5%
total 2.5%
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
parsed_sample:
- name: "spi"
cpu: ""
usage: "1"
- name: "console"
cpu: ""
usage: "0"
- name: "firewall"
cpu: ""
usage: "0.5"
- name: "networking"
cpu: ""
usage: "0"
- name: "management"
cpu: ""
usage: "0.5"
- name: "profiling"
cpu: ""
usage: "0"
- name: "unclassified"
cpu: ""
usage: "0.5"
- name: "total"
cpu: ""
usage: "2.5"
Loading