To use Azure Monitor for a linux service you would have to export their logs/metrics with an agent. For mariadb and apache below post gives you more details:
Hope this helps!
We have built our webservers and MariaDB database server running on Virtual machines. The Monitor section allows to monitor CPU Percentage, Disk read/write bytes/second, Network IN and OUT etc.. but there is no metric section that allows to configure Webserver and MariaDB. Is it possible to achieve this from Azure monitoring.
@Dayanand Prasad - Just checking in to see if the above answer helped. If this answers your query, do click "Accept as Answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.