{"id":23895314,"url":"https://github.com/bitcav/nitr","last_synced_at":"2025-04-10T15:26:25.814Z","repository":{"id":51076839,"uuid":"262474340","full_name":"bitcav/nitr","owner":"bitcav","description":":computer: Nitr is a System and Hardware Inspection and Monitoring Web API.","archived":false,"fork":false,"pushed_at":"2023-03-06T23:01:52.000Z","size":40914,"stargazers_count":50,"open_issues_count":1,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-24T13:21:18.851Z","etag":null,"topics":["api","bbolt","fiber","go","golang","gopsutil","hardware","inspection","json","linux","monitor","monitoring-tool","system","uikit","uikit3","windows"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitcav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-09T02:44:51.000Z","updated_at":"2025-02-21T09:41:11.000Z","dependencies_parsed_at":"2024-06-19T10:00:08.801Z","dependency_job_id":"18c02b22-bac6-49f6-83b5-39c88c2b51c4","html_url":"https://github.com/bitcav/nitr","commit_stats":null,"previous_names":["juanhuttemann/nitr-agent","juanhuttemann/nitr-api","bitcav/nitr-agent"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcav%2Fnitr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcav%2Fnitr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcav%2Fnitr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcav%2Fnitr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcav","download_url":"https://codeload.github.com/bitcav/nitr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243444,"owners_count":21071054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bbolt","fiber","go","golang","gopsutil","hardware","inspection","json","linux","monitor","monitoring-tool","system","uikit","uikit3","windows"],"created_at":"2025-01-04T15:54:47.472Z","updated_at":"2025-04-10T15:26:25.782Z","avatar_url":"https://github.com/bitcav.png","language":"Go","readme":"﻿﻿\n\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"Nitr\" height=\"125\" src=\"https://raw.githubusercontent.com/bitcav/nitr/master/images/logo.png\" style=\"max-width:100%;\"\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![go](https://raw.githubusercontent.com/bitcav/nitr/master/images/goversion.svg) [![Build Status](https://travis-ci.org/bitcav/nitr.svg?branch=master)](https://travis-ci.org/bitcav/nitr) ![Release](https://raw.githubusercontent.com/bitcav/nitr/master/images/release.svg)  [![Go Report Card](https://goreportcard.com/badge/github.com/bitcav/nitr)](https://goreportcard.com/report/github.com/bitcav/nitr) [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/bitcav/nitr/blob/master/LICENSE)\n\n\u003c/div\u003e\n\n# Nitr\n\nA **cross-platform remote monitoring tool** written in Golang for **system information gathering**, making it available through a **JSON API**. \n\nThe 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**. \n\n\u003cp\u003e\n    \u003cimg alt=\"Nitr\" src=\"https://raw.githubusercontent.com/bitcav/nitr/master/images/usage.gif\" style=\"width:100%;\"\u003e\n\u003c/p\u003e\n\n\u003e curl + jq demo\n\nTable of contents\n=================\n   * [Installation](#gear-installation)\n\t    * [Download](#download)\n\t    *  [Build](#build)\n   * [Running](#rocket-running)\n   * [Commands](#white_square_button-available-commands)\n   * [Docker](#whale-docker)\n   * [Web Panel](#earth_americas-web-panel)\n   * [QR Code](#qr-code)\n   * [Usage](#pick-usage)\n   \t   * [Example](#example)\n   * [Api v1](#api-v1)\n\t   * [Available Endpoints](#satellite-available-endpoints)\n\t   * [JSON Data References](#mag-json-data-references)\n * [Settings](#wrench-settings)\n * [Platform Support](#heavy_check_mark-platform-support)\n * [Powered by](#zap-powered-by)\n\n\n   \n\n## :gear: Installation\n\n### Download\n\nhttps://github.com/bitcav/nitr/releases/latest\n\n### Building from source\nNote: go version 1.13 or higher is required building it from the source.\n\n#### Clone\n```\ngit clone https://github.com/bitcav/nitr.git\n```\n#### Build\n```\ncd nitr\ngo build\n```\n\n## :rocket: Running\n\n**Linux**\n```\n./nitr\n```\n\n**Windows**\nYou can double click the .exe file or type in cmd\n```\nnitr.exe\n```\nthe server will start listening on port 8000 by default\n\n\u003cp style=\"width:100%;\"\u003e\n    \u003cimg alt=\"app\" src=\"https://raw.githubusercontent.com/bitcav/nitr/master/images/app-start.gif\"\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\n## :white_square_button: Available Commands\n\nHelp:\n\n```\nnitr -h\n```\n\nChange Password:\n\n```\nnitr passwd\n```\n\nGet api key:\n\n```\nnitr key\n```\n\nPrint Qr Code:\n\n```\nnitr qr\n```\n\n## :whale: Docker\n\nBuild image using command: \n```\ndocker build -t nitr . \n```\n\nRun container:\n\n```\ndocker run -d -p 8000:8000 nitr:latest\n```\n\n### :earth_americas: Web Panel\nGo to [http://localhost:8000](http://localhost:8000) in your web browser\n\n![preview](https://raw.githubusercontent.com/bitcav/nitr/master/images/login-web.png)\n\nAccess with default **password**: **123456**\n\n![preview](https://raw.githubusercontent.com/bitcav/nitr/master/images/panel-web.png)\n\n## QR Code\n\nThe QR Code contains the exact same information displayed in the Host Info Panel formatted as JSON.\n\n## :pick: Usage\n\nRequesting system info with HTTP Get Method through [the API endpoints](#satellite-available-endpoints) passing the \"x-api-key\" header with your ***api key*** as value and you will get success response.\n\n### Example:\n\n- Requesting CPU Information.\n\n\u003eWith Curl.\n```\ncurl -X Get 'http://localhost:8000/api/v1/cpu' -H 'x-api-key:yourapikeyhere'\n```\n\u003eWith Powershell.\n```\n Invoke-RestMethod -Uri http://localhost:8000/api/v1/cpu -H @{\"x-api-key\"=\"yourapikeyhere\"}\n```\n\u003eJSON Response:\n\n```json\n{\n\t\"vendor\":\"GenuineIntel\",\n\t\"model\":\"Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz\",\n\t\"cores\":4,\n\t\"threads\":8,\n\t\"frecuency\":3800,\n\t\"usage\":8.354430379674321,\n\t\"usageEach\":[\n\t\t\t\t9.803921568623954,\n\t\t\t\t7.692307692348055,\n\t\t\t\t4.166666666635087,\n\t\t\t\t4.166666666698246,\n\t\t\t\t6.122448979565321,\n\t\t\t\t6.12244897961267,\n\t\t\t\t4.081632653074482,\n\t\t\t\t5.88235294118696\n\t]\n}\n```\n\n## API v1\n\n### Root Endpoint\n\n```\nhttp://localhost:8000/api/v1\n```\n\n### :satellite: Available Endpoints\n\nThese endpoints allow you to get System and Hardware information about your **host**. Check the [example](#example) for a better understanding.\n\n| Verb   | Endpoint                      | JSON Data                    |\n|--------|-------------------------------|------------------------------|\n|GET     | /cpu                          | [CPU](#cpu)                  |\n|GET     | /bios                         | [Bios](#bios)                |\n|GET     | /bandwidth                    | [Bandwidth](#bandwidth)      |\n|GET     | /chassis                      | [Chassis](#chassis)          |\n|GET     | /disks                        | [Disks](#disks)              |\n|GET     | /drives                       | [Drives](#drives)            |\n|GET     | /gpu                          | [GPU](#gpu)                  |\n|GET     | /isp                          | [ISP](#isp)                  |\n|GET     | /network                      | [Network](#network)          |\n|GET     | /processes                    | [Processes](#processes)      |\n|GET     | /ram                          | [RAM](#ram)                  |\n|GET     | /baseboard                    | [Baseboard](#baseboard)      |\n|GET     | /product                      | [Product](#product)          |\n|GET     | /memory                       | [Memory](#Memory)            |\n\n\n\n\n\n## :mag: JSON Data References\n\n### CPU \n\u003e JSON Object\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| vendor    | string         | CPU Vendor               |\n| model     | string         | CPU Model                |\n| cores     | integer        | Amount of CPU cores      |\n| threads   | integer        | Amount of CPU threads    |\n| clockSpeed| float          | Clock Speed in Mhz       |\n| usage     | float          | CPU usage percentage     |\n| usageEach | Array of float | Usage percentage per CPU |\n\n\n### Bios\n\u003e JSON Object\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| vendor    | string         | Vendor                   |\n| version   | string         | Bios version             |\n| date      | string         | Bios last update         |\n\n\n### Bandwidth\n\u003eJSON Array of Objects\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| name      | string         | Network Interface name   |\n| rxBytes   | integer        | Amount of bytes received |\n| txBytes   | integer        | Amount of bytes sent     |\n| rxPackets | integer        | Total packets received   |\n| txPackets | integer        | Total packets sent       |\n\n### Chassis\n:lock: Requires running **nitr** with elevated privileges \n\u003e JSON Object\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| type      | string         | Type                     |\n| vendor    | string         | Chassis vendor           |\n| serial    | string         | Chassis serial           |\n\n### Disks\n\u003eJSON Array of Objects\n\n| Key        | Data Type       | Description                      |\n|------------|-----------------|----------------------------------|\n| mountPoint | string          | Drive Letter or Mount Point      |\n| free       | integer         | Available disk space in bytes    |\n| size       | integer         | Total disk space in bytes        |\n| used       | integer         | Used disk space in bytes         |\n| percent    | float           | Disk usage percent               |\n\n### Drives\n\u003e JSON Array of Objects\n\n| Key        | Data Type       | Description                      |\n|------------|-----------------|----------------------------------|\n| name       | string          | Drive name                       |\n| type       | string          | Drive type                       |\n| model      | string          | Drive model                      |\n| serial     | string          | Drive serial                     |\n\n### GPU\n\u003e JSON Array of Objects\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| brand     | string         | GPU Brand                |\n| model     | string         | GPU Model                |\n\n### ISP\n\u003eJSON Object\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| isp       | string         | Internet Service Provider|\n| ip        | string         | Public IP Address        |\n| lat       | string         | Location Latitude        |\n| lon       | string         | Location Longitude       |\n\n### Network\n\u003eJSON Array of Objects\n\n| Key       | Data Type       | Description                            |\n|-----------|-----------------|----------------------------------------|\n| name      | string          | Network Interface name                 |\n| addresses | Array of string | IPv4 and IPv6 list                     |\n| mac       | string          | MAC Address                            |\n| active    | boolean         | True if the Network Interface is Up    |\n\n\n### Processes\n\u003e JSON Array of Objects\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| pid       | integer        | Process ID               |\n| name      | string         | Process Name             |\n\n### Ram\n\u003e JSON Object\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| total     | integer        | Total RAM in bytes       |\n| free      | integer        | Free RAM in bytes        |\n| usage     | integer        | Used RAM in bytes        |\n\n### Baseboard\n:lock: Requires running **nitr** with elevated privileges \n\u003e JSON Object\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| vendor    | string         | Baseboard vendor         |\n| assetTag  | string         | Asset Tag                |\n| serial    | string         | Baseboard serial         |\n| version   | string         | Baseboard Version        |\n\n### Product\n:lock: Requires running **nitr** with elevated privileges \n\u003eJSON Object\n\n| Key       | Data Type      | Description              |\n|-----------|----------------|--------------------------|\n| vendor    | string         | Product vendor           |\n| family    | string         | Product family           |\n| assetTag  | string         | Asset Tag                |\n| serial    | string         | Product serial           |\n| uuid      | string         | Product UUID             |\n| sku       | string         | Product SKU              |\n| version   | string         | Product Version          |\n\n### Memory\n:lock: Requires running **nitr** with elevated privileges \n\u003eJSON Array of Objects\n\n| Key          | Data Type       | Description                     |\n|--------------|-----------------|---------------------------------|\n| bank\t\t   | string \t\t | Bank Identifier                 |\n| size         | integer         | Size                            |\n| unit         | string          | Unit (KB or MB)                 |\n| type         | string          | Type                            |\n| formFactor   | string          | Form Factor                     |\n| manufacturer | string          | Manufacturer                    |\n| serial       | string          | Serial Number                   |\n| assetTag     | string          | Asset Tag                       |\n| partNumber   | string          | Part Number                     |\n| speed        | integer         | Speed in MT/s                   |\n| dataWidth    | integer         | Data Width in bits              |\n| totalWidth   | integer         | Total Data Width in bits        |\n\n\n## :wrench: Settings\n\nThe following settings are located in the `config.ini` file\n  \n\n### Server Port\n\nBy default, the web server starts on port 8000.\n\n\n```\nport: 3000\n```\n\n### Open Browser on Startup\n\nIf true, opens your default web browser on server startup.\n\n\n```\nopen_browser_on_startup: true\n```\n\n### Enabling Logs\n\nIf true, logs are saved in `nitr.log` file, otherwise logs are printed out to console.\n\n\n```\nsave_logs: true\n```\n\n### Enable SSL\n\nIf true, server starts using HTTPS protocol.  Certificate and Key must be provided\n```\nssl_enabled: true\nssl_certificate: /path/to/file.crt\nssl_certificate_key: /path/to/file.key\n```   \n\n## :heavy_check_mark: Platform Support\n\n**Windows**\n\nTested:\n- Windows 10\n- Windows 7 SP1\n\n**Linux**\n\nTested:\n- Ubuntu Linux 20.04 LTS\n- Debian Linux 10\n- Manjaro Linux 20\n\n\n## :zap: Powered by\n\n* [Fiber](https://gofiber.io/) - The web framework used\n* [bbolt](https://github.com/etcd-io/bbolt) - Database\n* [UIKit](https://getuikit.com/) - Front-End framework\n* [gopsutil](https://github.com/shirou/gopsutil) - psutil for Golang\n* [ghw](https://github.com/jaypipes/ghw) - Golang HardWare discovery/inspection library\n* [go-smbios](https://github.com/digitalocean/go-smbios) - Detection and access to System Management BIOS\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcav%2Fnitr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcav%2Fnitr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcav%2Fnitr/lists"}