Good day everyone,
I’m very very new to MikroTik scripting, I’m not a L1/L2/L3 support or anything and need to write a script which does 2 (two) very simple things:
CLI:
1: /system/identity/print
2: /interface/print
These are the things that I need to get as info from my router, but here comes the hard part:
1: Get only the value from name of /system/identity/print
2: Get the first 3 values of /interface/print
3. Push these values directly to update a MySQL table on a remote server
The whole idea of this is that I can give an URL to people without any access to the router, to see what is connected on which port and if it’s active or not. This is to avoid waiting for the NOC to pick up the phone, spend 30-60min explanation who are you, what are you doing, what info they need, log in to the router and give you the port number of your customer to follow the patch cord and test the fiber for issues. (I know, patch cords can be labeled, but they don’t do it and with nearly 1M customers it’s too late to start). Exporting the information from the MySQL with PHP is very easy part, but importing it from the CLI of the CCR2004 to the MySQL looks impossible for me. Please help!
Example:
https://info.example.com
Port 1 Active
Port 2 Not-Active
Port 3 Not-Active
…