The Dashboard provides the administrator with a summary of the status of the console server and its Managed Devices. Custom dashboards can be configured for each user groups.
Configuring the Dashboard
Only users who are members of the admin group (and the root user) can configure and access the dashboard.To configure a custom dashboard:
- Select System: Configure Dashboard and select the user (or group) you are configuring this custom dashboard layout for
Note: 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 dashboard or admin group dashboard configured, then you will see the default dashboard. The root user does not have its own dashboard. The above configuration options are intended to enable admin users to setup their own custom dashboards
The Dashboard displays six widgets . These widgets include each of the Status screens (alerts, devices, ports ups, rpc and environmental status) and a custom script screen. The admin user can configure which of these widgets is to be displayed where:
- Go to the Dashboard layout panel and select which widget is to be displayed in each of the six display locations (widget1 …6)
- Click Apply
Note: The Alerts widget is a new screen that shows the current alerts status. When an alert gets triggered, a corresponding .XML file is created in /var/run/alerts/. The dashboard scans all these files and displays a summary status in the alerts widget. When an alert is deleted the corresponding .XML files that belong to that alert are also deleted.
To configure what is to be displayed by each widget:
- Go to the Configure widgets panel and configure each selected widget (e.g. specify which UPS status is to be displayed on the ups widget or the maximum number of Managed Devices to be displayed in the devices widget
- Click Apply
Note: Dashboard configuration is stored in the /etc/config/config.xml file. Each configured dashboard will increase the config file. If this file gets too big, you can run out of memory space on the console server.
Creating custom widgets for the Dashboard
To run a custom script inside a dashboard widget:
Create a file called "widget-<name>.sh" in the folder /etc/config/scripts/ where <name> can be anything. You can have as many custom dashboard files as you want.
Inside this file you can put any code you wish. When configuring the dashboard, choose "widget-<name>.sh" in the dropdown list. The dashboard will run the script and display the output of the script commands directly on the screen, inside the specific widget.
The best way to format the output would be to send HTML commands back to the browser by adding echo commands in the script:
You can of course run any command and its output will be displayed in the widget window directly.
Below is an example script which 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 specific URL and displays it in the widget.
date >> /tmp/test
echo '<tr><td> This is my custom script running </td></tr>'
echo '<img src="http://www.vinras.com/images/linux-online-inc.jpg">'