54 lines
1.3 KiB
Markdown
54 lines
1.3 KiB
Markdown
# PastafariStats, a simple collector for basic stats.
|
|
|
|
## Installation
|
|
|
|
You can install PastafariStats with its command.
|
|
|
|
`pip3 install git+https://bitbucket.org/paramecio/pastafaristats`
|
|
|
|
### Add systemd service
|
|
|
|
If your linux distro use systemd, you can initialize the script with this systemd unit
|
|
|
|
```
|
|
# Save it in /etc/systemd/system/pastafaristats.service
|
|
|
|
[Unit]
|
|
Description=Pastafari Stats
|
|
After=syslog.target
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=pzoo
|
|
Group=pzoo
|
|
ExecStart=pastafaristats
|
|
Restart=always
|
|
Environment=PYTHONUNBUFFERED=1
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
```
|
|
|
|
### Configuration
|
|
|
|
You can configure the script placing a config file in /etc/pastafari/stats.cfg
|
|
|
|
```
|
|
[DEFAULT]
|
|
|
|
url_server=http://url_server_collect_data/send_data/api_key/api_key_selected/ip/ip_server
|
|
```
|
|
|
|
Where url_server_collect_data is the hostname of server collecting data, api_key_selected, the api key of server for accept the data, and ip_server, the ip of the server that send the data.
|
|
|
|
# Configuration for Windows 10, Windows Server 2012, etc.
|
|
|
|
Windows sucks, but you can need monitoring windows servers or desktops.
|
|
|
|
First, install python 3 (last stable version if you can, actually python 3.9). You can download from [here](https://www.python.org/downloads/)
|
|
|
|
###Important
|
|
|
|
**You must install python with "Add to windows path" enabled.**
|
|
|