Table of Contents |
---|
Assumptions:
- installed opCharts
Overview
...
Operational mode (standalone or not)
Not-Standalone
When opCharts is not in standalone mode 'opcharts_running_standalone' => 'false', opCharts will be linked to NMIS and the index page will show a node search and a default dashboard (if the user has chosen one). In this mode there are no custom opcharts users or customers. Although the menu will allow the user to create them they will not be used. All users are loaded from the NMIS configuration as well as their privilege mode.
Authentication not working? Check out: Configuring NMIS to use Internal Authentication
Node search: the search box for nodes will search by the ip address, node name or group name. Tokens are separated by spaces,-,_,etc, and the search is currently only starting from the beginning of a token.
Standalone
When opCharts is in standalone mode, no connection to NMIS is made or attempted. The index page will show a list of dashboards the user is able to view. If the user sets one of these dashboards as their default the index page will display that dashboard in the place of the list of dashboards. If the administrator would like to set a default dashboard for the customer that can be done. See default_for in the Dashboards seciton.
Data Sources
Non-Standalone
In non standalone mode the data sources specified are currently ignored. All data is taken from the NMIS configuration which is specified in conf/opCommon.nmis.
Standalone
/usr/local/omk/conf/data_sets.json defines the data sources that the system will make available to the charts. Currently only SQL data sources will work. The default configuration ships with examples for MSSQL and MySQL servers. The layout of a data source looks like this:
Code Block |
---|
{
"name" : "mssql_example", # name used to access this data source in charts.json
"type" : "sql", # fixed, no other types are currently available
"data_models" : [ "sql_query" ], # also fixed.
"parameters" : {
"scheme" : "dbi", # fixed
"driver" : "ODBC:DRIVER=FreeTDS", # dbi options that have been installed are available, only MSSQL and MySQL are tested
"host" : "mani.opmantek.com", # SQL server host/ip
"port" : "1433", # port SQL can be found on
"database_name" : "testdb", # database to pull data from
"username" : "sa", # username
"password" : "password" #password
}
}, |
The name specified for your data source will be used in other configuration files to access the data from this data source.
Dashboards
Dashboards can be created and set as the default for many different views of the system (depending on standalone mode the options to do this differ).
...
More information on Dashboards can be found HERE: Dashboards
- defined application wide (not stored per user)
- names are unique, cannot be changed after creation (because they are used to link into other places, like default dashboards
- permissions per dashboard define what roles can view the specific dashboard
- care should to be taken to ensure that a dashboard that is visible to a customer does not contain graphs that the customer should not see (no permissions exist for charts)
- allows admin to adjust if specific dashboards should override auto generated dashboards
- if a dashboard is deleted which is also set to a users default dashboard the user will just see the regular index page because the one picked cannot be found.
default_for
Standalone mode:
Specifying a dashboard with permissions checked for only Customer and a default for of "index_opCharts" will make that dashboard appear in the users index view. Same goes for operator permissions and administrator permissions. The same dashboard can be used for more than one role if both roles are selected.
Non-Standalone mode:
When opCharts is linked to NMIS it displays the information available from the model of the node, all graphs that exist for a node or node resource
...
are shown. To override these default dashboards to show only the information you prefer, create a dashboard with the charts you would like to show. Then enter the correct default for string. opCharts will search from most-specific default_for to least specific default_for, if nothing is found matching it will display an auto-generated dashboard.
The search is separated into 2 categories:
- Node only
- Node resource / indexed resource
Node Only
The search for node only dashboards goes like this:
"${model_name}",
"default"
In the shipping configuration
...
no dashboards are defined. If the user wanted to override the default dashboard for the "CiscoRouter"
...
model, put "CiscoRouter" in the default_for box of the dashboard and it will then be displayed in place of the auto-generated dashboard. All components displayed will have the "node" in the component replaced with the node that is currently being viewed.
Node Resource / indexed resource
The search for this is more complex but it works the same way:
...
"${model_name}_${resource_name}_${dataset_name}",
"node_${resource_name}_${dataset_name}",
"${model_name}_${resource_id}_default",
"node_${resource_name}_default",
"${model_name}_resource_default",
"node_resource_default"
Example:
omk/opCharts/nodes/asgard/resources/nodehealth/datasets/MemoryFreeIO
omk/opCharts/nodes/asgard/resources/resource_name/datasets/dataset_name
So dashboards can be set per resource / dataset specifically for a model or for all nodes (in that case use word "node" instead of the model name). The default config
...
Charts
...
does not ship with any examples of this.