Choose Manage CSO from the drop-down. This opens up a form with the following details:
We create a CSC like any other monitor. Go to monitors page and select Add new monitor from the drop-down
function() { var sqlObject = MONyog.UserObject('<Name of your Custom SQL Object>'); if (!sqlObject || !sqlObject.isEnabled() || !MONyog.MySQL.Custom.Available) return '(n/a)'; /* You will have to call select here to fetch the resultset. */ var resultSet = sqlObject.select(); var results = ''; /* results holds the resultset in the form of array of row(s).*/ /*Get column(s) for each row from the result set */ for (i in resultSet) { if (resultSet.length > 0) results += '<br>'; results += resultSet[i].<Column name in resultset> + '.' + resultSet[i].<Column name in resultset>; } if (results.length == 0) results = 'None'; return results; } |
| | | | | | | |