rasti.hil@hilandco.com +41 79 367-9677

Search This Blog

How to verify checksum on a Mac - SHA1, SHA256


SHA1 checksum

shasum -a 1 file


SHA256 checksum

shasum -a 256 file



Installing Grafana on Windows

install

choco install grafana

Config

copy c:\ProgramData\chocolatey\lib\grafana\tools\grafana-6.3.6\conf\defaults.ini c:\ProgramData\chocolatey\lib\grafana\tools\grafana-6.3.6\conf\custom.ini

"C:\Program Files\Notepad++\notepad++.exe" c:\ProgramData\chocolatey\lib\grafana\tools\grafana-6.3.6\conf\custom.ini

http_port = 8080

Windows Service 

choco install nssm
nssm install grafana c:\ProgramData\chocolatey\lib\grafana\tools\grafana-6.3.6\bin\grafana-server.exe
sc start grafana

Config Grafana
Configuration - Data Source - name : telegraf  - url: http://localhost:8086
Dashboard - Import - https://grafana.com/grafana/dashboards/1902

Install Telegraf

choco install telegraf
"C:\Program Files\Notepad++\notepad++.exe"  C:\Program Files\telegraf\telegraf.conf
url: http://localhost:8086
database: telegraf

sc start telegraf

Installing InfluxDB on Windows

install

choco install influxdb


"C:\Program Files\Notepad++\notepad++.exe" C:\influxdata\influxdb-1.7.10-1\influxdb.conf

Storage

dir = "C:/influxdata/storage/meta"
dir = "C:/influxdata/storage/data"
wal-dir = "C:/influxdata/storage/wal"

logging

logging-enabled = true
trace-logging-enabled = false 
query-log-enabled = true

HTTP endpoint

[http]
enabled = true

c:\influxdata\influxdb-1.7.10-1/influxd.exe -config influxdb.conf

Windows Service 

choco install nssm
nssm install influxdb c:\influxdata\influxdb-1.7.10-1\influxd.exe "-config c:\influxdata\influxdb-1.7.10-1\influxdb.conf"
sc start influxdb

Installing JMeter on Windows with Influxdb and Grafana


install

choco install jmeter

Config JMeter

download:https://github.com/NovatecConsulting/JMeter-InfluxDB-Writer/releases/download/v-1.2/JMeter-InfluxDB-Writer-plugin-1.2.jar
copy to: c:\ProgramData\chocolatey\lib\jmeter\tools\apache-jmeter-5.2.1\lib\ext\

Config InfluxDB

c:\influxdata\influxdb-1.7.10-1/influx.exe
CREATE DATABASE jmeter
SHOW DATABASES

Config Grafana

Configuration - Data Source - name : jmeter  - url: http://localhost:8086
Dashboard - Import -https://grafana.com/grafana/dashboards/5496


Config Test


Ansible


Adhoc

Lookup

ansible -m debug localhost -a msg="{{ lookup('url', 'http://localhost:8090/nslookup?host=blog.hilandco.com') }}"

Docker shell2http nslookup


Dockerfile

FROM shell2http:bind-tools
RUN apk --no-cache add bind-tools


docker-compose.yml

version: '2'
services:
  nslookup_api:
    image: shell2http:bind-tools
    ports:
      - "8090:8080"
    restart: unless-stopped
    command:  [ "-form", "/nslookup", "nslookup -q=A $$v_host | tail -2 | head -1 | awk '{print $$2\" \" $$3\" \" $$4}'" ]


Test
 curl localhost:8090/nslookup?host=blog.hilandco.com