OneAgent MSSQL plugin¶
Gathers MSSQL stats. The full description of stats is described at https://msdn.microsoft.com/en-us/en-en/library/ms190382(v=sql.110).aspx
MSSQL collect SQL server performance counters specified in JSON configuration using pywin32 which is a set of extension modules that provides access to Windows API functions.
Plugin requires no configuration, database instance name is detected automatically from process snapshot.
-
class
ruxit_mssql.CounterDesc(path, handle, timeseriesKey)¶ Bases:
tupleNamedtuple that is used for storing details about particular performance counter: whole path including object and metric name, handle to counter and corresponding timeseries key.
-
handle¶
-
path¶
-
timeseriesKey¶
-
-
class
ruxit_mssql.MsSqlPlugin(**kwargs)[source]¶ Bases:
ruxit.api.base_plugin.BasePluginMSSQL plugin class. This plugin is stateful - initialize and close methods are defined in order to maintain one PDH query for the lifetime of the plugin.
__init__ should not be overridden without a call to super.
Parameters: - config (Dict[str, str]) -- plugin configuration
- results_builder (ResultsBuilder) -- instance for this plugin,
- json_config -- parsed plugin.json contents,
- plugin_info (PluginInfo) -- json data of the plugin exposed in a more convenient way,
- associated_entity -- monitored entity associated with the plugin, if any (deprecated).
- activation_context -- activation context for the plugin,
- process_snapshot (ProcessSnapshot) -- latest available at method call,
- entity_resolver (EntityResolver) -- exposes additional methods for querying snapshot
- logger -- plugin specific logger for plugin development, set to None only in unit tests
-
initialize(**kwargs)[source]¶ Plugin initialization. This method includes opening PDH query, getting MSSQL instance name from snapshot and parsing plugin.json file in order to add all counters to query.
-
add_counters()[source]¶ Parses timeseries defined in plugin.json one by one and adds particular counters to query