-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1 @@ | ||
# custom-exporter | ||
|
||
## Overview | ||
This project is a tool for monitoring system processes in Linux. It uses the `procfs` library to read process information from the Linux proc file system and provides metrics about the number and types of processes running on the system. | ||
|
||
## Installation | ||
To install this project, you need to have Go installed on your system. Then you can clone this repository and build the project with `go build`. | ||
|
||
## Usage | ||
After building the project, you can run it with `./projectname`. It will print the total number of processes and the number of processes in each state. | ||
|
||
## Collectors | ||
Collectors are functions that gather the metrics. In this project, there are two collectors: | ||
|
||
- `countProcesses`: This collector counts the total number of processes. | ||
- `countProcessTypes`: This collector counts the number of processes in each state. | ||
|
||
## Configuration | ||
There is no configuration needed for this project. It reads the process information directly from the proc file system. | ||
|
||
## Metrics | ||
The metrics provided by this project are: | ||
|
||
- `total_processes`: The total number of processes running on the system. | ||
- `processes_by_state`: The number of processes in each state. The states are represented as strings, such as "R" for running, "S" for sleeping, etc. | ||
|
||
## Contributing | ||
If you want to contribute to this project, please open a pull request with your changes. | ||
|
||
## License | ||
This project is licensed under the MIT License. See the LICENSE file for details. | ||
# custom-exporter |