248
1.877.877.2269
BLACKBOX.COM
NEED HELP?
LEAVE THE TECH TO US
LIVE 24/7
TECHNICAL
SUPPORT
1.877.877.2269
CHAPTER 13: STATUS REPORTS
You can configure a custom dashboard for any admin user or for the admin group or you can reconfigure the default dashboard.
The Status > Dashboard screen is the first screen displayed when admin users (other than root) log into the console manager.
If you log in as john, and john is member of the admin group and there is a dashboard layout configured for john, then you will see the
dashboard for john on log-in and each time you click on the Status > Dashboard menu item.
If there is no dashboard layout configured for john but there is an admin group dashboard configured, then you will see the admin
group dashboard instead. If there is no user-specific dashboard or admin group dashboard configured, the default dashboard is
displayed.
NOTE: The root user does not have its own dashboard.
The Dashboard displays a configurable number of widgets. These widgets include status for major subsystems such as conma,
Auto-Response, Managed Devices and cellular.
The admin user can configure which of these widgets is to be displayed where:
Go to the Dashboard layout panel and select the widgets to display in each Widget Slot.
Click Apply.
NOTE: Dashboard configuration is stored in /etc/config/config.xml. Each configured dashboard will increase the size of this file. If
this file gets too big, you can run out of memory space on the console server.
13.5.2 CREATING CUSTOM WIDGETS FOR THE DASHBOARD
To run a custom script in a dashboard widget, create a file called widget-<name>.sh in the folder /etc/config/scripts/. You can have as
many custom dashboard files as you want.
Put any code inside this file. When configuring the dashboard, choose widget-<name>.sh from the dropdown list. The dashboard runs
and displays the script’s output inside the widget.
The best way to format the output is to send HTML back to the browser using echo:
echo '<table>'
You can run any command and its output will be displayed in the widget window directly.
Below is an example script. It writes the current date to a file, and then echo's HTML code back to the browser. The HTML code gets
an image from a URL and displays it in the widget.
#!/bin/sh
date >> /tmp/test
echo '<table>'
echo '<tr><td> This is my custom script running </td></tr>'
echo '<tr><td>'
echo '<img src="http://vinras.com/images/linux-online-inc.jpg">'
echo '</td></tr>'
echo '</table>'
exit 0