jhuckaby / performa

A multi-server monitoring system with a web based UI.
Other
431 stars 22 forks source link

More monitors #11

Open webkida opened 3 years ago

webkida commented 3 years ago

Hello,

How can we monitor tomcat and MySQL queries

jhuckaby commented 1 year ago

Very sorry for the incredibly long delay on this response.

You can monitor anything you want. You just need to add a custom Command which executes a command-line executable that produces output you can parse. Then add a Monitor which points to your command output as its data source. You can use a regular expression to locate a specific data metric (number value) in your command output, or, if the command produces JSON, you can traverse the JSON tree to locate the data metric.

Take a look at the "Count Open Files" command, which executes cat /proc/sys/fs/file-nr, and the "Open File Descriptors" monitor, which uses that custom command output. These ship with Performa, and showcase how to do this.