CCR2004-1G-12S-2XS Script to export to MySQL

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

running 1M customer without SNMP monitoring ?
... script to collect basic ROS info ?
is this a joke ?

There are reasons which are not public information and I will not disclose them, so if you don’t have an answer how this script to happen - please keep the comment to yourself.

I think the attempt is - in good faith - about making you avoid to fall for the chocolate-covered banana:
https://jdebp.uk/FGA/put-down-the-chocolate-covered-banana.html

Indeed. What you need to do is write a script that exports it in tab-separated lines, and then run another script on your MySQL server that imports these into your database.

Thank you for your answer. It is much appreciated.