Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Adding A New Dashboard For Slave Status

forums forums Monyog Monyog Comments Adding A New Dashboard For Slave Status

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #10484
      ctaleck
      Member

      I am trying to add a new “Availability” graphic on the dashboard using the following code:

      [codebox]

      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);[/codebox]

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

      Any ideas?

    • #24683
      Manoj
      Member

      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”

Viewing 1 reply thread
  • You must be logged in to reply to this topic.