MySQL plugin
For more information about what this plugin does and the data streams it retrieves, see:
The data source is available as a Cloud data source and also as an on-prem data source. This data source allows for the connection from the on-prem SquaredUp agent to any MySQL instance which is available to connect to with SQL Login.
An on-prem data source connects a service running in your internal network to SquaredUp. They require an agent installed on a machine that has access to your internal network.
To add a data source click on the + next to Data Sources on the left-hand menu in SquaredUp. Search for the data source and click on it to open the Configure data source page.
Before you start
Configuring and deploying an agent
If you have already created an agent in SquaredUp that you can use for this data source, you can skip this step and choose the agent group you want to use while Configuring the data source.
See one of the following, depending on your platform type:
Configuring the data source
Display Name:
Enter a name for your data source. This helps you to identify this data source in the list of your data sources.Agent Group:
Select the Agent Group that contains the agent(s) you want to use.This field will only appear if you are adding the MySQL on-prem data source.
- Username:
Enter the SQL account username - Password:
The SQL account password - Server:
The server address or IP to connect to. Do not include a port with the SERVER value.If you are adding the MySQL on-prem data source, the server must be accessible from the machine running the SquaredUp on-prem agent.
- Database:
The name of the database to initially connect to. Any queries executed without a database explicitly set will be run against this database. - Port:
The port to use to connect to SQL. The default is 3306, but can be changed as needed. - Object Query (optional):
The MySQL Server Connection can create objects in the Knowledge Graph index and these can be used to create context sensitive objects and drill-downs.These plugins support the creation of objects from a database query. The resulting table must contain sourceId, name, and type fields. Additional fields are allowed, and any non-null fields will be included with the object when imported into the Knowledge Graph.
A sample query result is below:
In the above sample table two objects will be created in the Knowledge Graph. The first will be of type user and have a sourceId of abeLincoln and a single property for initials. The operating_system attribute will not be added to this object as it has a null property. The second object created will be a server with sourceId server_1 and a single property of operating_system.
- Relationship Query (optional):
If you are creating objects with the Object Query set in the previous step, you can relate those objects in the Knowledge Graph.Along with an Object Query an additional Relationship Query can also be used. The result of this query must contain the fields inV, outV, and label. The rows of this result will be converted to relationships in the Knowledge Graph.
A sample query result is below:
After the import is complete the two objects created from the Object Query will now be linked, with Abraham Lincoln owning Infra-SQL01.local
Restrict access to this data source:
You can enable this option if you only want certain users or groups to have access to the data source, or the permission to link it to new workspaces. See data source access control for more information.The term data source here really means data source instance. For example, a user may configure two instances of the AWS data source, one for their development environment and one for production. In that case, each data source instance has its own access control settings.
By default, Restrict access to this data source is set to off. The data source can be viewed, edited and administered by anyone. If you would like to control who has access to this data source, switch Restrict access to this data source to on.
Use the Restrict access to this data source dropdown to control who has access to the workspace:
- By default, the user setting the permissions for the data source will be given Full Control and the Everyone group will be given Link to workspace permissions.
- Tailor access to the data source, as required, by selecting individual users or user groups from the dropdown and giving them Link to workspace or Full Control permissions.
- If the user is not available from the dropdown, you are able to invite them to the data source by typing in their email address and then clicking Add. The new user will then receive an email inviting them to create an account on SquaredUp. Once the account has been created, they will gain access to the organization.
- At least one user or group must be given Full Control.
- Admin users can edit the configuration, modify the Access Control List (ACL) and delete the data source, regardless of the ACL chosen.
See Access control for more information.
Click Add.
You can also add a data source from Settings > Data Sources > Add data source, but sample dashboards are not added when using this method.
Next steps
Data streams standardize data from all the different shapes and formats your tools use into a straightforward tabular format.
While creating a tile you can tweak data streams by grouping or aggregating specific columns.
Depending on the kind of data, SquaredUp will automatically suggest how to visualize the result, for example as a table or line graph.
Data streams can be either global or scoped:
- Global data streams are unscoped and return information of a general nature (e.g. "Get the current number of unused hosts").
- A scoped data stream gets information relevant to the specific set objects supplied in the tile scope (e.g. "Get the current session count for these hosts").
Data streams
The following data streams are installed with this plugin.
Data streams standardize data from all the different shapes and formats your tools use into a straightforward tabular format.
While creating a tile you can tweak data streams by grouping or aggregating specific columns.
Depending on the kind of data, SquaredUp will automatically suggest how to visualize the result, for example as a table or line graph.
Data streams can be either global or scoped:
- Global data streams are unscoped and return information of a general nature (e.g. "Get the current number of unused hosts").
- A scoped data stream gets information relevant to the specific set objects supplied in the tile scope (e.g. "Get the current session count for these hosts").
See Data Streams for more information.
This allows for any tabular data to be pulled into to SquaredUp and be displayed in a standard table.
This configurable data stream type allows for data to be displayed in a visual format, such as a line graph. When writing a query for use as a Metrics query, the below three columns are mandatory and all others will be ignored.
This configurable data stream allows for data to be displayed as a state tile (Red, Yellow, or Green blocks). When writing a query for use in a State query the below three columns are mandatory and all others will be ignored.
Mustache Parameters
A mustache parameter is a dynamic value, the actual value will be inserted to replace the field in curly braces. For example, {{timeframe.start}}
will insert the start time based on the timeframe configured within the tile, or {{name}}
will insert the name of the object(s) in scope.
- Only scoped data streams are able to insert properties from objects in scope, such as
sourceIds
,sourceId
andtargetNodes
. They will also be able to use other properties such astimeframe
. - Global data streams are able to use other properties, such as
timeframe
.
timeframe
All of the properties in the calling event payload are passed through to the template builder with the addition of below three properties.
- durationSeconds
- durationMinutes
- durationHours
For example:
Select CustomerName, Order from dbo.Orders where orderDT > DateADD(mi, -{{timeframe.durationMinutes}},GetDate())
sourceIds
This is a unique property as some pre-processing occurs within the data source to modify the values. sourceIds will return a list of all the targeted nodes sourceId elements, concatenated with commas and string delimiters for TSQL friendly systems.
For example:
Select CustomerName, Order from dbo.Orders where customerId IN ({{sourceIds}})
sourceId
This will return the sourceId of the first target node in the query. While not as powerful as the sourceIds value, it works for systems that don't support TSQL syntax and will still allow drill-down behavior. For Example:
Select CustomerName, Order from dbo.Orders where customerId = '{{sourceId}}'
targetNodes:
This property represents the targetNodes on the calling event with the small addition of a first and last property on the respective nodes. This allows for Mustache templates to do a couple tricks, for example:
Select CustomerName, Order from dbo.Orders where customerId = '{{targetNodes.0.sourceId}}'
Select CustomerName, Order from dbo.Orders where customerId IN ({{#targetNodes}}'{{sourceId}}'{{^last}},{{/last}}{{/targetNodes}})