Infrastructura partiala

Monitorizarea infrastructurii folosind Prometheus și Grafana

Într-un mediu cu unul sau mai multe servere Linux este utilă monitorizarea resurselor hardware și software pentru identificarea rapidă a problemelor de performanță. Prometheus și Grafana permit colectarea și vizualizarea în timp real a metricilor precum utilizarea procesorului, memoriei, spațiului de stocare și traficului de rețea.

Implementarea unei soluții de monitorizare bazată pe:

  • Prometheus pentru colectarea metricilor
  • Node Exporter pentru expunerea metricilor sistemului
  • Grafana pentru vizualizarea datelor

Pasul 1- Instalarea Node Exporter

(pe Ubuntu)

sudo apt update
sudo apt install prometheus-node-exporter

Verificare:

systemctl status prometheus-node-exporter

Pasul 2 – Instalarea Prometheus

Docker:

docker run -d \
--name prometheus \
-p 9090:9090 \
prom/prometheus

Acces:

http://IP_SERVER:9090

Pasul 3 – Configurarea Prometheus

Fișier:

scrape_configs:
  - job_name: 'node'
    static_configs:
      - targets: ['IP_SERVER:9100']

Restart Prometheus.

Pasul 4 – Instalarea Grafana

Docker:

docker run -d \
--name grafana \
-p 3000:3000 \
grafana/grafana

Acces:

http://IP_SERVER:3000

Pasul 5 – Adăugarea Prometheus ca Data Source

Grafana → Connections → Data Sources → Add Data Source → Prometheus

URL:

http://IP_PROMETHEUS:9090

Save & Test.

Pasul 6 – Crearea Dashboard-ului

Dashboard → Import

Poți importa dashboard-ul oficial Node Exporter:

1860

Acesta afișează:

  • CPU Usage
  • RAM Usage
  • Disk Usage
  • Network Traffic
  • Load Average.
[mai mult...]

Kubernetes și Docker

Ai construit o aplicație web. Vine momentul să o urci pe un server real și brusc nimic nu mai funcționează. Lipsesc dependențe, versiunile de biblioteci nu se potrivesc, configurările sunt altele. E clasicul „la mine merge”.

Acum gândește-te că aplicația ta crește. Nu mai ai un singur serviciu, ci zece, douăzeci, poate cincizeci de bucăți separate care trebuie să lucreze împreună. Fiecare trebuie să ruleze pe cont propriu, să vorbească cu celelalte, să se ridice singur dacă pică și să facă față când vine val de trafic.

[mai mult...]

How to configure a Synology and what you can do with it

Initial Setup

Step 1: Connect Hardware

  • Insert your hard drives into the NAS bays
  • Connect the NAS to your router via Ethernet
  • Plug in power and turn it on

Step 2: Find Your NAS on the Network

  • On a computer connected to the same network, open a browser and go to:
    find.synology.com
  • This will detect your NAS and let you start setup
  • Alternatively, you can find it via Synology Assistant software (Windows/Mac)

Step 3: Install DSM (DiskStation Manager)

  • DSM is Synology’s operating system (like Windows for your NAS).
  • Follow the web wizard:
    • Install the latest version of DSM.
    • Create an admin account.
    • Configure basic network settings.

 Storage Setup

Step 1: Create a Storage Pool

  • Go to Storage Manager → Storage Pool → Create
  • Choose the RAID type:
    • RAID 1: Mirrored drives (good for 2 drives, protects against 1 drive failure)
    • RAID 5/6: More drives, combines performance and redundancy

Step 2: Create Volumes

  • Volumes sit on top of storage pools
  • Go to Storage Manager → Volume → Create
  • Choose filesystem (Btrfs recommended for Synology features like snapshots).

 Shared Folders & User Accounts

Shared Folders

  • Go to Control Panel → Shared Folder → Create
  • Give it a name and set permissions (read/write for certain users).
  • Example folders:
    • Documents → family or work files
    • Media → movies, music, photos

User Accounts

  • Control Panel → User → Create
  • Assign shared folder permissions (read/write or read-only).
  • You can create groups for easier permission management.

 Accessing Your NAS

On a Computer

  • Windows: Map a network drive → \\NAS_NAME\SharedFolder
  • Mac: Finder → Go → Connect to Server → smb://NAS_NAME/SharedFolder

On a Mobile Device

  • Use Synology Drive, DS File, DS Photo, or DS Video apps.

Remotely

  • Enable QuickConnect: Control Panel → QuickConnect → enable
  • This gives you an easy URL to access files outside your network without port forwarding.

 Extra Features You Can Use

Media Server

  • Install Plex or Synology Video Station from Package Center
  • Stream movies/music/photos to devices on your network.

Backup

  • Windows: Use Synology Drive Client.
[mai mult...]