Closed mholttech closed 1 year ago
That appears to be an undocumented variable that is not declared within the package's manifest (https://github.com/elastic/package-spec/issues/656). Seems like it's a feature of input packages that is not documented by the elastic/package-spec. We'll have into inject that variable in as a policy template variable.
POST kbn:/api/fleet/package_policies
{
"policy_id": "<agent_policy_id>",
"package": {
"name": "sql",
"version": "0.4.0"
},
"name": "sql-1",
"description": "",
"namespace": "default",
"inputs": {
"sql-sql/metrics": {
"enabled": true,
"streams": {
"sql.sql": {
"enabled": true,
"vars": {
"hosts": [
"root:test@tcp(127.0.0.1:3306)/"
],
"period": "10s",
"driver": "mysql",
"sql_queries": "- query: SHOW GLOBAL STATUS LIKE 'Innodb_system%'\n response_format: variables\n \n",
"merge_results": false,
"data_stream.dataset": "sql"
}
}
}
}
}
}
PTAL at #27
Thanks Andrew! I'm checking it out now and will report back shorly
I'm generating module for https://github.com/elastic/integrations/tree/main/packages/sql_input but it is not exposing the data_stream.dataset variable.