Tag Archives: script
Crazy DevOps interview questions (3)

Note: The first 2 episodes of the interview series can be found here and here.


Question 1:

The interviewer comes in and hands you the following ls -la listing:

# ls -la
total 108
dr-xr-x---.  7 root root  4096 Sep  5 07:16 .
dr-xr-xr-x. 22 root root  4096 Sep  1 17:43 ..
-rw-------.  1 root root 15432 Sep  5 06:36 .bash_history
-rw-r--r--.  1 root root    18 May 20  2009 .bash_logout
-rw-r--r--.  1 root root   176 May 20  2009 .bash_profile
-rw-r--r--.  1 root root   176 Sep 23  2004 .bashrc
-rw-r--r--   1 root root     0 Sep  5 07:16 -f
...

They say the -f file must go; would you please delete it?

Continue Reading →

Publishing to Atlassian Confluence (with Python)

Introduction

This text is about automating the interaction with Atlassian Confluence, a commercial product widely used in the corporate world for publishing documentation or other content that needs sharing with a certain team, department or throughout the whole organization. This product is usually integrated with the other Atlassian tools such as Bamboo or JIRA.

By “automating the interaction” I understand document publishing; one may extract data from other components of the system using automated tools and may want this data published in a nice format (if possible). This is indeed possible through the REST interface that Atlassian provides for all its products. The REST functionality does not cover all the features or functions, though, but it’s enough for our scenario. The reference for the Confluence Cloud version can be found here. Please note that the interface may be a bit different between versions, so please check the API reference for your particular Confluence version.

Now that we have the tools and the method, let’s get to the implementation – and obviously, to some code.

Continue Reading →

MySQL Monitoring with Amazon CloudWatch

Amazon CloudWatch is the monitoring tool for all the Amazon Cloud services. It offers both White Box and Black Box monitoring for services managed by Amazon and can be extended to work with user-generated monitoring data.

This text covers the integration of a simple MySQL monitoring script with Amazon CloudWatch.

MySQL Monitoring

Let’s assume that we want to monitor the number of active connections to the MySQL server and have an indication on when this figure becomes close to the maximal value defined in the configuration file (max_connections). In order to be portable, we may want to also report this value to the monitoring engine, even if it’s unlikely that a change may occur without explicit human intervention.

MySQL provides 3 numeric figures we may be interested in:

Continue Reading →

Previous Page · Next Page