Stretch etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Stretch etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

2 Mayıs 2018 Çarşamba

GraphPing Installation on Debian 9

GraphPing Installation

You can reach the following link of the Source code of graphping; 
https://github.com/jaxxstorm/graphping

System upgrade
$sudo apt-get -y upgrade
$sudo apt-get -y install git curl

Nodejs Installation
$curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
$sudo apt-get update
$sudo apt-get install -y build-essential libssl-dev nodejs
$sudo npm install nodeunit

Graphping clone
$git clone https://github.com/jaxxstorm/graphping.git

Go installation
$wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz
$sudo tar -xvfz go1.10.1.linux-amd64.tar.gz
$sudo mv go /usr/local
$export GOROOT=/usr/local/go
$export GOPATH=$HOME/graphping
$export PATH=$GOPATH/bin:$GOPATH/bin:$PATH

Check the Go version and env
$go version
$go env

Glide installation
$mkdir -p graphping/bin
$mkdir -p graphping/src
$cd graphping
$curl https://glide.sh/get | sh

Build and installing the graphping
$cd graphping
$go build main
If you get to any packet missing error you can get download like following commands
$go get github.com/Sirupsen/logrus
$go get github.com/cactus/go-statsd-client/statsd
$go get github.com/jaxxstorm/graphping/config
$go get github.com/jaxxstorm/graphping/ping
$go get gopkg.in/urfave/cli.v1
$sudo ln -s /home/arm/graphping/main /usr/local/bin/graphping
$graphping -h

$sudo nano /etc/systemd/system/graphping.service
[Unit]
After = network.target
[Service]
ExecStart = /usr/local/bin/graphping -c /home/arm/graphping/examples/example.json -s 127.0.0.1:8125
[Install]
WantedBy = multi-user.target
$sudo systemctl enable graphping.service


Statsd Installation
$sudo adduser statsd
$sudo git clone https://github.com/etsy/statsd.git
$sudo mkdir -p /etc/statsd
$sudo cp statsd/exampleConfig.js /etc/statsd/config.js
$sudo nano /etc/systemd/statsd.service
[Service]
ExecStart=/usr/bin/node /opt/statsd/stats.js /etc/statsd/config.js
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=statsd
User=statsd
Group=statsd
Environment=NODE_ENV=production</code>
[Install]
WantedBy=multi-user.target


$sudo nano /etc/statsd/config.js
{
influxdb: {
version: 0.9, // !!! we installed 0.9
host: '127.0.0.1', // InfluxDB host. (default 127.0.0.1)
port: 8086, // InfluxDB port. (default 8086)
database: 'graphping', // InfluxDB database instance. (required)
username: 'demo', // InfluxDB database username. (required)
password: 'demo', // InfluxDB database password. (required)
flush: {
enable: true // Enable regular flush strategy. (default true)
},
//proxy: {
//enable: false, // Enable the proxy strategy. (default false)
//suffix: 'raw', // Metric name suffix. (default 'raw')
//flushInterval: 1000 // Flush interval for the internal buffer.
// (default 1000)
//} packets should be "repeated" (duplicated to)..d process starts ['up' or 'down', default: 'up']
},
port: 8125, // StatsD port.
backends: ['./backends/console', 'statsd-influxdb-backend'],
debug: false,
legacyNamespace: false
}

$sudo systemctl enable statsd.service
$sudo systemctl start statsd.service
$sudo systemctl status statsd.service
$sudo journcalctl -f -u statsd
$ npm install statsd-influxdb-backend -d


Influxdb Installation
By the way statsd is only support version of 0.9 yet
$wget https://s3.amazonaws.com/influxdb/influxdb_0.9.5.1_amd64.deb
$sudo dpkg -i influxdb_0.9.5.1_amd64.deb
$sudo systemctl start influxdb.service
You have to create a database and user for connect to influxdb via statsd
You can reach via http://ip-of-the-influxdb::8083
Test the graphping following command
$sudo graphping -c graphping/examples/example.json -s 127.0.0.1:8125

Check the measurements via web ui of influxdb.
It has to be like the image.


Start the graphping
$sudo systemctl start graphping.service

Grafana Installation
$sudo nano /etc/apt/sources.list
deb https://packagecloud.io/grafana/stable/debian/ stretch main
$curl https://packagecloud.io/gpg.key | sudo apt-key add -
$sudo apt-get update
$sudo apt-get install grafana
$sudo systemctl enable grafana-server
$sudo systemctl start grafana-server
You can reach via http://ip-of-the-grafana:3000

21 Aralık 2017 Perşembe

ActiveMQ Artemis Installation on Debian 9

This is a base installation of ActiveMQ Artemis.
I am checking cluster and fail over configuration of Artemis. When it is ready I will share on my blog.

OpenJDK of Zulu For JAVA:

$sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
$sudo apt-add-repository 'deb http://repos.azulsystems.com/debian stable main'
$sudo apt-get update
$sudo apt-get install zulu-8

More about Zulu;
https://www.azul.com/

Artemis Installation :
$wget http://ftp.itu.edu.tr/Mirror/Apache/activemq/activemq-artemis/2.4.0/apache-artemis-2.4.0-bin.tar.gz
$ sudo tar -zxvf apache-artemis-2.4.0-bin.tar.gz -C /opt/
$cd /opt

The most commonly used artemis commands are:
    address     Address tools group (create|delete|update|show) (example ./artemis address create)
    browser     It will browse messages on an instance
    consumer    It will consume messages from an instance
    create      creates a new broker instance
    data        data tools group (print) (example ./artemis data print)
    help        Display help information
    mask        mask a password and print it out
    migrate1x   Migrates the configuration of a 1.x Artemis Broker
    producer    It will send messages to an instance
    queue       Queue tools group (create|delete|update|stat) (example ./artemis queue create)

sudo ./bin/artemis create /opt/broker-name
You can now start the broker by executing:

   "/opt/broker-name/bin/artemis" run

Or you can run the broker in the background using:

   "/opt/broker-name/bin/artemis-service" start

Base Configuration of Artemis:
If you want access the web-ui from any where ,you have to change as below of the "web bind" in the <broker>/etc/bootstrap.xml.

<web bind="http://0.0.0.0:8161" path="web">
       <app url="activemq-branding" war="activemq-branding.war"/>
       <app url="artemis-plugin" war="artemis-plugin.war"/>
       <app url="console" war="console.war"/>
   </web>
If you do not set the jolokia, you can not reach the stats of artemis.
Below configuration that is enough for your access..
Jolokia settings:
<broker>/etc/jolokia-access.xml

<allow-origin>*://<ipaddressorfqdnofartemis>*</allow-origin>

Create a Systemd File for Artemis:
$sudo nano /etc/systemd/system/artemis.service

#############################################
[Unit]
Description=Apache ActiveMQ Artemis
After=network-online.target

[Service]
Type=forking
WorkingDirectory=/opt/broker-name/bin
ExecStart=/opt/broker-name/bin/artemis-service start
ExecStop=/opt/broker-name/bin/artemis-service stop
Restart=on-abort
User=root
Group=root

[Install]
WantedBy=multi-user.target
################################################

$sudo systemctl daemon-reload

Now you can start via systemd as a be service of Artemis.
$sudo systemctl start artemis.service

You can reach the web admin panel:
http://ipaddressorfqdnofartemis:8161