Posts

Showing posts from August, 2018

Latest Post

Fluentd error: Unable to push logs to [elasticsearch]

After application deployments, Kibana stopped showing logs exactly after 7 days. The error "Fluentd error: Unable to push logs to [elasticsearch]" was shown in the fluentd logs. The initial response was to increase the buffer limits for fluentd as follows:

chunk_limit_size 10Mqueue_limit_length 256
The behavior occurred again after two weeks, which led to the same error. On closer investigation, the error was preceded by the statement "Failed to write to the buffer." This led me to inspect the fluentd configuration again and found the following code in the buffer part which caused the fluentd buffers to be filled as per the official documentation on Fluentd :
overflow_action blockThe fix for this overflow_action is to change from block to drop_oldest_chunk, allowing the fluentd logs to flow seamlessly to the elastic search by dropping the oldest logs in the buffer.
  <buffer> @type file path /var/log/fluentd-buffers/kubernetes.system.buffer flush_mode inter…

Nutanix Calm Blueprint for Single Linux VM

Image
Here is the first Nutanix Calm blueprint which creates a Linux VM and installs Nginx using a Chef role.

1. First we need to upload the RedHat qcow image into the Nutanix PC image repository. 
2. Create a blueprint.


3. Select the cloud. Here we have the options: Nutanix, VMware, AWS and GCP. Nutanix is your on-premise Nutanix infrastructure which we will be using in this example.






3. Select the Redhat image under images. (Note: I customized the image by setting the root password so that I could use it for the blueprint. I will publish the method in a separate blog post.)


4. Select Cloud-init under "Guest Customization".

5. Here is the script I used for cloud-init:

https://github.com/jsam316/NTNX/blob/calm/chefcloudinitconfig.yml
@@{name}@@ is the variable for the name of the virtual machine. Here the script downloads and installs the chef client
and allows httpd service in the firewalld daemon and then runs chef-client and assigns the role created.

6. Enter the credentials i…

On-board Linux computers to Azure Log Analytics

For on-boarding linux servers to Azure log analytics, just execute the command on the respective server:
wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/master/installer/scripts/onboard_agent.sh && sh onboard_agent.sh -p [protocol://][user:password@]proxyhost[:port] -w <YOUR WORKSPACE ID> -s <YOUR WORKSPACE PRIMARY KEY>
In few cases like mine, the servers will not have access to internet and we will need to install the downloaded oms agent package with the proxy information. 
sh omsagent-1.6.0-42.universal.x64.sh --install -w <YOUR WORKSPACE ID> -s <YOUR WORKSPACE PRIMARY KEY> -p [protocol://][user:password@]proxyhost[:port]
The proxy can have username and password for authentication and even if no proxy authentication is required, we will need to enter a dummy username and password which in the example below is azure and azure.
sh omsagent-1.6.0-42.universal.x64.sh --install -w <YOUR WORKSPACE ID> -s <YOUR WORKSPACE PRIMA…