Documentation ¶
Overview ¶
Copyright 2016 Staples, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Meta ¶
func Meta() *plugin.PluginMeta
Meta returns information about the plugin for the snap agent
Types ¶
type Process ¶
Process acceses information through the /proc file system to return metrics on a process
type Procstat ¶
type Procstat struct {
// contains filtered or unexported fields
}
Procstat defines procstat type
func (*Procstat) CollectMetrics ¶
func (p *Procstat) CollectMetrics(metricTypes []plugin.MetricType) ([]plugin.MetricType, error)
CollectMetrics returns metrics from gopsutil
func (*Procstat) GetConfigPolicy ¶
func (p *Procstat) GetConfigPolicy() (*cpolicy.ConfigPolicy, error)
GetConfigPolicy returns a ConfigPolicy
func (*Procstat) GetMetricTypes ¶
func (p *Procstat) GetMetricTypes(cfg plugin.ConfigType) (mts []plugin.MetricType, err error)
GetMetricTypes returns the metric types exposed by gopsutil