Help - Search - Members - Calendar
Full Version: Adding A New Dashboard For Slave Status
Webyog Forums > MONyog > MONyog Comments
ctaleck
I am trying to add a new "Availability" graphic on the dashboard using the following code:

CODE

obj = {
Caption : "Slave Status",
SeriesCaption : ["Running", "Stopped"],
SeriesValues : [MONyog.MySQL.Slave.Slave_running == "ON"?1:"", MONyog.MySQL.Slave.Slave_running == "ON"?"":1],
ChartType : "Line",
YAxisType : "OnOff"
};
_DASHBOARD_MYSQL_COUNTERS.push(obj);


The logic must not be correct as it always shows "Stopped" when I know the slave is running.

Any ideas?
Manoj
Hello,

Thanks for trying MONyog.

First I will tell you Slave_running is not a value exposed by SHOW SLAVE STATUS, it is exposed by SHOW STATUS, so you need to use "MONyog.MySQL.GlobalStatus.Slave_running".

Following is the full dashboard implementation of Slave Running...

obj = {
Caption : "Slave Status",
SeriesCaption : ["Running", "Stopped"],
SeriesValues : [MONyog.MySQL.GlobalStatus.Slave_running == "ON"?1:"", MONyog.MySQL.GlobalStatus.Slave_running == "ON"?"":1],
ChartType : "Line",
YAxisType : "OnOff",
ChartValue: "Current"
};
_DASHBOARD_MYSQL_COUNTERS.push(obj);


The extra property that you need to add other than the properties used in Availability graph is "ChartValue". This is required because all the current dashboard graphs are plotted on Delta context values(Difference b/w last two capture), Availability is a custom value and it will have valid value in all context( Alltime/Current, Delta, Default Timeframe as well as Custom Timeframe), but here "Slave_running " is not a custom value and it won't have a valid value in Delta context. So we need to tell explicitly to use Current context. This is not documented in Help and we will add this also in the next release. Once again thanks for reporting.


The possible values for ChartValue is "Current" / "Latest"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.