-
Golang logging using USER profile on Mint 19
Hi, I committed on learning Golang and as a part of this task i came to play with logging examples. It seems that if you user syslog.LOG_USER the info is stored in the /var/log/syslog. Here is the code and also the output package main import ( “io” “log” “log/syslog” “os” “path/filepath” ) func main() {…
-
Small go code example for zookeeper resource editing
Hi, We have the task of “service restart coordination” for our Apache Kafka cluster. It’s still a work in progress but if you want to use the zookeeper for some status verification and update, something like this will work as an example. package main import ( “fmt” “io” “launchpad.net/gozk” “os” “strings” “sync” “time” ) const…
-
Kafka cluster nodes and controller using golang
Hi, Using the golang library for zookeeper from here you can get very easily the nodes that are registered in the cluster controller node. In order to install this module, beside needing to setup the GOPATH you will have also to install packages from linux distro repo called: bzr, gcc, libzookeeper-mt-dev Once all of this…
-
Error 127, not related to Puppet or Golang
Hi, Something from my experience playing with Golang and Puppet code this morning. I wrote a very very simple script to restart a service that you can find here Today i wanted to put it on the machine and run it with puppet, so i wrote a very small class that looked like this: class…
-
Golang example for kafka service restart script
Hi, Not much to say, a pretty decent script for Kafka service restart(i tried to write it for our rolling upgrade procedure) that it’s still work in progress. If there are any changes that needed to be made to it, i will post it. Here is the script: Cheers