cd /your_dir/nitr
go build
./nitr <interval(/s)> <Username> <Password> <Host:Port> <Database>
#for example
#./nitr 30 root PassWord_123 127.0.0.1:3306 nitr
A cross-platform remote monitoring tool written in Golang for system information gathering, making it available through a JSON API.
The main purpose of this project is to provide highly available data of CPU, RAM, Disks, Network, Processes and so on, to make use of them in applications such as web administration panels or mobile apps.
curl + jq demo
- Installation
- Running
- Commands
- Docker
- Web Panel
- QR Code
- Usage
- Api v1
- Settings
- Platform Support
- Powered by
https://github.com/bitcav/nitr/releases/latest
Note: go version 1.13 or higher is required building it from the source.
git clone https://github.com/bitcav/nitr.git
cd nitr
go build
Linux
./nitr
Windows You can double click the .exe file or type in cmd
nitr.exe
the server will start listening on port 8000 by default
Help:
nitr -h
Change Password:
nitr passwd
Get api key:
nitr key
Print Qr Code:
nitr qr
Build image using command:
docker build -t nitr .
Run container:
docker run -d -p 8000:8000 nitr:latest
Go to http://localhost:8000 in your web browser
Access with default password: 123456
The QR Code contains the exact same information displayed in the Host Info Panel formatted as JSON.
Requesting system info with HTTP Get Method through the API endpoints passing the "x-api-key" header with your api key as value and you will get success response.
- Requesting CPU Information.
With Curl.
curl -X Get 'http://localhost:8000/api/v1/cpu' -H 'x-api-key:yourapikeyhere'
With Powershell.
Invoke-RestMethod -Uri http://localhost:8000/api/v1/cpu -H @{"x-api-key"="yourapikeyhere"}
JSON Response:
{
"vendor":"GenuineIntel",
"model":"Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz",
"cores":4,
"threads":8,
"frecuency":3800,
"usage":8.354430379674321,
"usageEach":[
9.803921568623954,
7.692307692348055,
4.166666666635087,
4.166666666698246,
6.122448979565321,
6.12244897961267,
4.081632653074482,
5.88235294118696
]
}
http://localhost:8000/api/v1
These endpoints allow you to get System and Hardware information about your host. Check the example for a better understanding.
Verb | Endpoint | JSON Data |
---|---|---|
GET | /cpu | CPU |
GET | /bios | Bios |
GET | /bandwidth | Bandwidth |
GET | /chassis | Chassis |
GET | /disks | Disks |
GET | /drives | Drives |
GET | /gpu | GPU |
GET | /isp | ISP |
GET | /network | Network |
GET | /processes | Processes |
GET | /ram | RAM |
GET | /baseboard | Baseboard |
GET | /product | Product |
GET | /memory | Memory |
JSON Object
Key | Data Type | Description |
---|---|---|
vendor | string | CPU Vendor |
model | string | CPU Model |
cores | integer | Amount of CPU cores |
threads | integer | Amount of CPU threads |
clockSpeed | float | Clock Speed in Mhz |
usage | float | CPU usage percentage |
usageEach | Array of float | Usage percentage per CPU |
JSON Object
Key | Data Type | Description |
---|---|---|
vendor | string | Vendor |
version | string | Bios version |
date | string | Bios last update |
JSON Array of Objects
Key | Data Type | Description |
---|---|---|
name | string | Network Interface name |
rxBytes | integer | Amount of bytes received |
txBytes | integer | Amount of bytes sent |
rxPackets | integer | Total packets received |
txPackets | integer | Total packets sent |
🔒 Requires running nitr with elevated privileges
JSON Object
Key | Data Type | Description |
---|---|---|
type | string | Type |
vendor | string | Chassis vendor |
serial | string | Chassis serial |
JSON Array of Objects
Key | Data Type | Description |
---|---|---|
mountPoint | string | Drive Letter or Mount Point |
free | integer | Available disk space in bytes |
size | integer | Total disk space in bytes |
used | integer | Used disk space in bytes |
percent | float | Disk usage percent |
JSON Array of Objects
Key | Data Type | Description |
---|---|---|
name | string | Drive name |
type | string | Drive type |
model | string | Drive model |
serial | string | Drive serial |
JSON Array of Objects
Key | Data Type | Description |
---|---|---|
brand | string | GPU Brand |
model | string | GPU Model |
JSON Object
Key | Data Type | Description |
---|---|---|
isp | string | Internet Service Provider |
ip | string | Public IP Address |
lat | string | Location Latitude |
lon | string | Location Longitude |
JSON Array of Objects
Key | Data Type | Description |
---|---|---|
name | string | Network Interface name |
addresses | Array of string | IPv4 and IPv6 list |
mac | string | MAC Address |
active | boolean | True if the Network Interface is Up |
JSON Array of Objects
Key | Data Type | Description |
---|---|---|
pid | integer | Process ID |
name | string | Process Name |
JSON Object
Key | Data Type | Description |
---|---|---|
total | integer | Total RAM in bytes |
free | integer | Free RAM in bytes |
usage | integer | Used RAM in bytes |
🔒 Requires running nitr with elevated privileges
JSON Object
Key | Data Type | Description |
---|---|---|
vendor | string | Baseboard vendor |
assetTag | string | Asset Tag |
serial | string | Baseboard serial |
version | string | Baseboard Version |
🔒 Requires running nitr with elevated privileges
JSON Object
Key | Data Type | Description |
---|---|---|
vendor | string | Product vendor |
family | string | Product family |
assetTag | string | Asset Tag |
serial | string | Product serial |
uuid | string | Product UUID |
sku | string | Product SKU |
version | string | Product Version |
🔒 Requires running nitr with elevated privileges
JSON Array of Objects
Key | Data Type | Description |
---|---|---|
bank | string | Bank Identifier |
size | integer | Size |
unit | string | Unit (KB or MB) |
type | string | Type |
formFactor | string | Form Factor |
manufacturer | string | Manufacturer |
serial | string | Serial Number |
assetTag | string | Asset Tag |
partNumber | string | Part Number |
speed | integer | Speed in MT/s |
dataWidth | integer | Data Width in bits |
totalWidth | integer | Total Data Width in bits |
The following settings are located in the config.ini
file
By default, the web server starts on port 8000.
port: 3000
If true, opens your default web browser on server startup.
open_browser_on_startup: true
If true, logs are saved in nitr.log
file, otherwise logs are printed out to console.
save_logs: true
If true, server starts using HTTPS protocol. Certificate and Key must be provided
ssl_enabled: true
ssl_certificate: /path/to/file.crt
ssl_certificate_key: /path/to/file.key
Windows
Tested:
- Windows 10
- Windows 7 SP1
Linux
Tested:
- Ubuntu Linux 20.04 LTS
- Debian Linux 10
- Manjaro Linux 20