Moved Content
This commit is contained in:
67
Apps/AMP/Commands.md
Normal file
67
Apps/AMP/Commands.md
Normal file
@@ -0,0 +1,67 @@
|
||||
This is a list of commonly used commands used to manage AMP trough the command line.
|
||||
|
||||
```bash
|
||||
ampinstmgr --help
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Power state
|
||||
|
||||
Start a specifik instance
|
||||
|
||||
```bash
|
||||
ampinstmgr -s InstanceName
|
||||
```
|
||||
|
||||
Start all instances
|
||||
|
||||
```bash
|
||||
ampinstmgr -a
|
||||
```
|
||||
|
||||
Restart a specifik instance
|
||||
|
||||
```bash
|
||||
ampinstmgr -r InstanceName
|
||||
```
|
||||
|
||||
Restart all instances
|
||||
|
||||
```bash
|
||||
ampinstmgr --RestartAllInstances
|
||||
```
|
||||
|
||||
Stop a specifik instance
|
||||
|
||||
```bash
|
||||
ampinstmgr -q InstanceName
|
||||
```
|
||||
|
||||
Stop all instances
|
||||
|
||||
```bash
|
||||
ampinstmgr -o
|
||||
```
|
||||
|
||||
---
|
||||
## Update
|
||||
|
||||
Update a specifik instance
|
||||
```bash
|
||||
ampinstmgr -u InstanceName
|
||||
```
|
||||
|
||||
Update all instances
|
||||
|
||||
```bash
|
||||
ampinstmgr -p
|
||||
```
|
||||
|
||||
Show AMP version
|
||||
|
||||
```bash
|
||||
ampinstmgr --Version
|
||||
```
|
||||
|
||||
---
|
||||
0
Apps/AMP/Setup.md
Normal file
0
Apps/AMP/Setup.md
Normal file
12
Apps/Ansible.md
Normal file
12
Apps/Ansible.md
Normal file
@@ -0,0 +1,12 @@
|
||||
## Installation
|
||||
`sudo apt update`
|
||||
`sudo apt install ansible`
|
||||
`sudo apt install sshpass`
|
||||
|
||||
## Commands
|
||||
`ansible -i ./inventory/hosts ubuntu -m ping --user someuser --ask-pass`
|
||||
`ansible-playbook ./playbooks/apt.yml --user someuser --ask-pass --ask-become-pass -i ./inventory/hosts`
|
||||
|
||||
|
||||
|
||||
|
||||
8
Apps/Git.md
Normal file
8
Apps/Git.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Git
|
||||
Git cheatsheet for command line
|
||||
|
||||
`git init`
|
||||
|
||||
`git pull`
|
||||
|
||||
`git push`
|
||||
68
Apps/Node exporter.md
Normal file
68
Apps/Node exporter.md
Normal file
@@ -0,0 +1,68 @@
|
||||
# Node exporter
|
||||
Node exporter is a compnantent used by prometheus to get server matrics.
|
||||
|
||||
## Local installation
|
||||
|
||||
**Download the script from github:**
|
||||
`wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz`
|
||||
|
||||
**Extract the tar file:**
|
||||
`tar xzf node_exporter-1.3.1.linux-amd64.tar.gz`
|
||||
|
||||
**Move file to command folder:**
|
||||
`sudo mv -v node_exporter-1.1.2.linux-amd64/node_exporter /usr/local/bin/`
|
||||
|
||||
**Set correct persmission in command file:**
|
||||
`sudo chown root:root /usr/local/bin/node_exporter`
|
||||
|
||||
**Test the command:**
|
||||
`node_exporter --version`
|
||||
|
||||
**Create a systemd service:**
|
||||
`sudo nano /etc/systemd/system/node-exporter.service`
|
||||
|
||||
**File shall containe this information:**
|
||||
```
|
||||
[Unit]
|
||||
Description=Prometheus exporter for machine metrics
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
User=root
|
||||
ExecStart=/usr/local/bin/node_exporter
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
TimeoutStopSec=20s
|
||||
SendSIGKILL=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target`
|
||||
```
|
||||
**Reload the services:**
|
||||
`sudo systemctl daemon-reload`
|
||||
|
||||
**Start and active the service:**
|
||||
*Start:* `sudo systemctl start node-exporter.service`
|
||||
*Activate:* `sudo systemctl enable node-exporter.service`
|
||||
|
||||
|
||||
|
||||
## Docker installation
|
||||
|
||||
```
|
||||
version: '3.3'
|
||||
services:
|
||||
node-exporter:
|
||||
network_mode: host
|
||||
pid: host
|
||||
volumes:
|
||||
- '/:/host:ro,rslave'
|
||||
image: 'quay.io/prometheus/node-exporter:latest'
|
||||
|
||||
prometheus:
|
||||
container_name: prometheus
|
||||
ports:
|
||||
- '9090:9090'
|
||||
volumes:
|
||||
- '/srv/dev-disk-by-uuid-82a4b0b6-2dc5-47df-b93f-d8e213f2f641/config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml'
|
||||
image: prom/prometheus:latest
|
||||
```
|
||||
1
Apps/readme.md
Normal file
1
Apps/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user