Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Collects Linux psutil metrics

License

NotificationsYou must be signed in to change notification settings

intelsdi-x/snap-plugin-collector-psutil

Repository files navigation

DISCONTINUATION OF PROJECT.

This project will no longer be maintained by Intel.

This project has been identified as having known security escapes.

Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.

Intel no longer accepts patches to this project.

This project will no longer be maintained by Intel. Intel will not provide or guarantee development of or support for this project, including but not limited to, maintenance, bug fixes, new releases or updates. Patches to this project are no longer accepted by Intel. If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the community, please create your own fork of the project.

Snap collector plugin - psutil

This plugin collects metrics from psutil which gathers information on running processes and system utilization (CPU, memory, disks, network).

It's used in theSnap framework.

  1. Getting Started
  1. Documentation
  1. Community Support
  2. Contributing
  3. License
  4. Acknowledgements

Getting Started

System Requirements

Note: This plugin does not require Python rather it depends on the go librarygopsutil.

Operating systems

All OSs currently supported by snap:

  • Linux/amd64
  • Darwin/amd64

Installation

Download psutil plugin binary:

You can get the pre-built binaries for your OS and architecture under the plugin'srelease page. For Snap, checkhere.

To build the plugin binary:

Forkhttps://github.com/intelsdi-x/snap-plugin-collector-psutil

Clone repo into$GOPATH/src/github.com/intelsdi-x/:

$ git clone https://github.com/<yourGithubID>/snap-plugin-collector-psutil.git

Build the plugin by running make within the cloned repo:

$ make

This builds the plugin in./build/

Configuration and Usage

Some metrics are platform specific (seegopsutil's current status).

Available configuration option:

  • mount_points - configuration of mount points to monitor, multiple paths should be separated with "|", e.g. "/|/dev|/run", default is set to collect only physical devices (hard disks, cd-rom, USB). Passing* enables collect data from all mount points.

Documentation

There are a number of other resources you can review to learn to use this plugin:

Collected metrics

List of metrics collected by this plugin can be found inMETRICS.md file.

Examples

This is an example running psutil and writing data to a file. It is assumed that you are using the latest Snap binary and plugins.

The example is run from a directory which includes snaptel, snapteld, along with the plugins and task file.

In one terminal window, open the Snap daemon (in this case with logging set to 1 and trust disabled):

$ snapteld -l 1 -t 0

In another terminal window:Load psutil plugin

$ snaptel plugin load snap-plugin-collector-psutil

See available metrics for your system

$ snaptel metric list

Create a task manifest file (e.g.task-psutil.json):

{"version":1,"schedule": {"type":"simple","interval":"1s"    },"workflow": {"collect": {"metrics": {"/intel/psutil/load/load1": {},"/intel/psutil/load/load5": {},"/intel/psutil/load/load15": {},"/intel/psutil/cpu/*/user": {},"/intel/psutil/net/*/bytes_sent": {},"/intel/psutil/vm/available": {},"/intel/psutil/vm/free": {},"/intel/psutil/vm/used": {}            },"config": {"/intel/mock": {"password":"secret","user":"root"                }            },"publish": [                {"plugin_name":"file","config": {"file":"/tmp/published_psutil"                    }                }            ]        }    }}

Load file plugin for publishing:

$ snaptel plugin load snap-plugin-publisher-filePlugin loadedName: fileVersion: 3Type: publisherSigned: falseLoaded Time: Fri, 20 Nov 2015 11:41:39 PST

Create task:

$ snaptel task create -t task-psutil.jsonUsing task manifest to create taskTask createdID: 02dd7ff4-8106-47e9-8b86-70067cd0a850Name: Task-02dd7ff4-8106-47e9-8b86-70067cd0a850State: Running

See file output (this is just part of the file):

2015-11-20 11:46:03.637390565 -0800 PST|[intel psutil load load1]|1.82|username-mac01.jf.intel.com2015-11-20 11:46:03.641160359 -0800 PST|[intel psutil load load15]|2.09|username-mac01.jf.intel.com2015-11-20 11:46:03.643858208 -0800 PST|[intel psutil load load5]|2.08|username-mac01.jf.intel.com2015-11-20 11:46:03.661173851 -0800 PST|[intel psutil vm available]|168882176|username-mac01.jf.intel.com2015-11-20 11:46:03.67167664 -0800 PST|[intel psutil vm free]|168943616|username-mac01.jf.intel.com2015-11-20 11:46:03.681965105 -0800 PST|[intel psutil vm used]|17010798592|username-mac01.jf.intel.com2015-11-20 11:46:04.641244629 -0800 PST|[intel psutil load load1]|1.82|username-mac01.jf.intel.com2015-11-20 11:46:04.644420189 -0800 PST|[intel psutil load load15]|2.09|username-mac01.jf.intel.com2015-11-20 11:46:04.647166418 -0800 PST|[intel psutil load load5]|2.08|username-mac01.jf.intel.com2015-11-20 11:46:04.657065347 -0800 PST|[intel psutil vm available]|168984576|username-mac01.jf.intel.com2015-11-20 11:46:04.666346721 -0800 PST|[intel psutil vm free]|169054208|username-mac01.jf.intel.com2015-11-20 11:46:04.676683476 -0800 PST|[intel psutil vm used]|17010716672|username-mac01.jf.intel.com

Stop task:

$ snaptel task stop 02dd7ff4-8106-47e9-8b86-70067cd0a850Task stopped:ID: 02dd7ff4-8106-47e9-8b86-70067cd0a850

Roadmap

There isn't a current roadmap for this plugin, but it is in active development. As we launch this plugin, we do not have any outstanding requirements for the next release. If you have a feature request, please add it as anissue and/or submit apull request.

Community Support

This repository is one ofmany plugins inSnap, a powerful telemetry framework. See the full project athttp://github.com/intelsdi-x/snap To reach out to other users, head to themain framework

Contributing

We love contributions!

There's more than one way to give back, from examples to blogs to code updates. See our recommended process inCONTRIBUTING.md.

License

Snap, along with this plugin, is an Open Source software released under the Apache 2.0License.

Acknowledgements

Andthank you! Your contribution, through code and participation, is incredibly important to us.

About

Collects Linux psutil metrics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors18


[8]ページ先頭

©2009-2025 Movatter.jp