teleren/devto huggingface dataset:
I love Nagios
Tags: itadmin, monitoring, nagios, servers
Published: 2020-01-27 22:15:35

---
title: I love Nagios
published: true
date: 2014-09-24 21:55:09 UTC
tags: ITAdmin,monitoring,nagios,servers
canonical_url: https://www.funkysi1701.com/posts/i-love-nagios-m6
---

[![Nagios](https://i1.wp.com/www.funkysi1701.com/wp-content/uploads/2014/09/nagios.png?resize=212%2C50)](https://i1.wp.com/www.funkysi1701.com/wp-content/uploads/2014/09/nagios.png)

You may not have heard of Nagios but it has saved my bacon quite a few times.

Nagios is an open source server monitoring application that runs on many linux flavours.

I can’t remember exactly when I first installed nagios but I am guessing it was sometime in 2007/8. My boss gave me a book about it (which I never read) and told me to create a system to monitor the companies servers.

Nagios is not simple to set up. It relies on setting up various Hosts and services. Hosts are usually physical servers that you want to monitor and services are all the services you want to monitor. As this is a linux program all these can be configured by editing the right config file

Nagios is very flexible and can be expanded easily with the use of plugins, if you want to monitor something there is usually a plugin available. If you have a dell server running openmanage software there is even a plugin that allows the temperature of your server to be monitored.

If you want to monitor windows servers the use of nsclient++ is a real advantage. This is a simple client that runs as a service on your windows server. This allows nagios to track memory, cpu, disk space, performance and services, in fact almost everything that you would want to monitor.

Over the years I have kept a close eye on Nagios and added extra checks as new services were added or problems encountered. A few years ago I dabbled with sending alerts out via SMS message and once I got a smart phone found an app to keep track of Nagios 24/7.

But recently I have started wondering if Nagios is the best way to monitor modern servers like 2012 or remote services like Azure. I want something that is easy to expand as your IT infrastructure expands. Something that relies on running on a linux OS requires your IT staff have a knowledge of linux and you keep that server maintained and updated.

My question is: Is Nagios still the best way to monitor my servers?

The post [I love Nagios](https://www.funkysi1701.com/2014/09/24/i-love-nagios/) appeared first on [Funky Si's Tech Talk](https://www.funkysi1701.com).
Kali Tools Website Launched, 1.0.9 Release
Published: 2023-08-21 21:17:39

---
title: Kali Tools Website Launched, 1.0.9 Release
published: true
date: 2014-08-25 00:00:00 UTC
tags: 
canonical_url: https://www.kali.org/blog/kali-linux-1-0-9-release/
---

Now that we have caught our breath after the Black Hat and DEF CON conferences, we have put aside some time to fix an annoying bug in our 1.0.8 ISO releases related to outdated firmware as well as regenerate fresh new ARM and VMware images (courtesy of [OffSec](https://www.offsec.com/) ) for our new [1.0.9 release](https://www.kali.org/get-kali/#kali-vm). With this release come a few more updates worth mentioning:

##### Rasberry Pi B+ ARM Image Support

We are pleased to announce that we have updated our Raspberry Pi Kali image to support the new B+ model so that now it works out of the box. This single image now supports all Raspberry Pi models.

##### Odroid U3, Cubox-i ARM Images Added

We have also included two more images to our Kali ARM image collection for the Odroid U3 and Cubox-i ARM computers. Each of these have interesting use cases as both their small form factor and specs are formidable. All of these news scripts can be found in our [OffSec GitHub](https://gitlab.com/kalilinux/build-scripts/kali-arm) page.

##### New Kali Tools Website!

After many months of typing, editing, and testing, we are delighted to announce the launch of our new [Kali Linux Tools](https://www.kali.org/tools) website. This new site is our official home for information on all of the tools included in Kali Linux. For each tool, you will find a description of the tool, links to the tool homepage, author and license information, and usage output so you can see what output you can expect from each utility in Kali.

In addition to the primary listing of all [Kali tools](https://www.kali.org/tools/), we have also made an effort to use tags throughout the site so you can more easily find a particular tool based on what it can do. You will find a tag cloud at the bottom of each page as you navigate the site. Also available is a full breakdown of the contents of each [Kali Linux metapackage](https://www.kali.org/docs/general-use/metapackages/), allowing you to see which tool is included in a particular metapackage, which makes the building of [custom ISOs](https://www.kali.org/docs/development/live-build-a-custom-kali-iso/) much easier.

We hope you enjoy our new Kali Linux Tools site and find it as useful as we do. If you are a tool author and have additional examples that you would like us to include in order to more fully cover your project, please feel free to [contact us](https://www.kali.org/contact/).

##### Looking towards the future

We have a massive set of of surprises in the works, some of which will be revealed in [Brucon](http://2014.brucon.org/index.php/Training_Kali_Linux_Dojo) and [Derbycon](https://www.derbycon.com/2014/08/11/kali-linux-dojo-at-derbycon/), where we’ll be running our second [Kali Linux Dojo](https://www.kali.org/docs/development/dojo-mastering-live-build/). See you there!
Apache Cassandra benchmarking
Published: 2017-10-31 19:53:10

---
title: "Apache Cassandra benchmarking"
published: true
tags: 
canonical_url: https://michael.mior.ca/blog/cassandra-benchmarking/
---

I was recently trying to run some benchmarks against [Apache Cassandra](http://cassandra.apache.org/) on [EC2](http://aws.amazon.com/ec2/) since unfortunately the servers I had in our machine room were destroyed in a fire. For all my local testing, I used a single instance running on my desktop machine, but I wanted to ramp things up for the real benchmarks and use three nodes. Since my workload is read-only and the dataset is fairly small, I also wanted a replication factor of three so each node would have a copy of all the data.

My first attempt to load all this data was to follow [some documentation](http://www.datastax.com/documentation/cql/3.0/cql/cql_using/update_ks_rf_t.html) provided by DataStax. Their suggestion was to use `ALTER KEYSPACE` in CQL to change the replication factor, and then simply run `nodetool repair` on each node. However, I found that running repair on just one node took several hours for a modest-sized amount of data (~2GB). This was a pretty big time sink as I wanted to able to quickly spin up and down a cluster for testing.

Next I tried changing the configured replication factor locally before exporting the data. I then simply copied the data to all nodes in the cluster and tried to start them as normal. This created some weird conflicts as nodes seemed to be confused about who owned what portion of data.

Finally, I simply loaded up the data set on a single node and configured a replication factor of three. I then started each node in sequence and the auto bootstrapping process took care of copying the entire dataset to each node in the cluster. This whole process was complete in less than half an hour. This approach wouldn’t really work in a production setting since it assumes the node has no existing data (although if you can afford to bring a node offline for a while, I suppose that it might work). In any case, this solution worked great for me and hopefully someone else finds this useful.
Form input type color element
Tags: html, colorpicker
Published: 2018-03-12 15:25:34

---
title: Form input type color element
published: true
tags: HTML5, color picker,
canonical_url: http://blog.mandarbadve.com/2014/08/10/form-input-type-color-element/
---

Now no more plug-in, no more libraries required for the color picker. HTML 5 gives you input element to select color.

Lets have look at the syntax.

```
<input type="color" name="mycolor" />
```

Simply by writing value of the type as color, browser will display color picker to you.

### Demo

<input type="color" name="mycolor" onchange="alert('Selected color: '+this.value)">

Check the browser compatibility for the&nbsp;input type color

[http://caniuse.com/input-color](http://caniuse.com/input-color)



_This post was originally published on [blog.mandarbadve.com](http://blog.mandarbadve.com/2014/08/10/form-input-type-color-element/)_
Configurations for a Friendlier tmux Status Bar
Published: 2020-06-29 12:46:52

---
title: Configurations for a Friendlier tmux Status Bar
published: true
date: 2014-08-09 23:22:00 UTC
tags: 
canonical_url: https://mjswensen.com/blog/friendlier-tmux-status-bar/
---

At work, the engineering team uses [tmux](https://tmux.github.io/) to manage the several instances of the services we run to develop the Lucid suite locally. It is a phenomenal terminal management system and the best part is that it is highly configurable. If you enjoy working in the command-line and haven’t checked it out yet, you need to!

This is what the default status bar looks like with a few windows open:

![tmux status bar before configurations](https://mjswensen.com/blog/images/tmux-status-bar-before.png)

I added a few config options to my `~/.tmux.conf` file to make the status bar easier to read:

{% gist https://gist.github.com/mjswensen/a8dd60823f5f05484190 %}

This is what the status bar looks like now:

![tmux status bar after configurations](https://mjswensen.com/blog/images/tmux-status-bar-after.png) (Terminal theme is the beautiful [Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) by [Chris Kempson](http://chriskempson.com).)

* * *

Update 5/16/2015 I still love and use tmux every day. I have recently moved from the default Terminal.app to the fantastic [iTerm2.app](http://iterm2.com/), in part because it has wonderful tmux integrations. In a nutshell, it is possible to attach to a tmux session with a special command-line flag that uses native iTerm panes/tabs/windows in place of the tmux panes and windows. This allows for easier scrolling, better copy/pasting, and better mouse integrations (i.e., switching between panes). It has loads of other features as well. I can't recommend it enough.

* * *

Update 8/26/2017 It's been just over three years since I wrote this post, and I still use tmux every day. My custom tmux status bar theme has largely remained the same as outlined above, too. For the rest of my development environment, I recently built a tool called [`themer`](https://github.com/mjswensen/themer) that greatly simplifies keeping a consistent theme between editors, terminals, other apps, and even desktop wallpaper. [Check out `themer` here.](https://themer.dev)
Remove .DS_Store from git repository
Tags: git, osx, dsstore
Published: 2014-08-05 17:30:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Remove .DS_Store from git repository
slug: remove-ds-store-from-git-repository
date: 2014-08-05 17:30
tags: 
 - git
 - osx
 - ds-store
---
The following will help you remove .DS_Store from your git repository.

    $ find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
    $ echo ".DS_Store" >> .gitignore
    $ git add .gitignore
    $ git commit -m ".DS_Store removed from repository"

Now you can relax.
CSS :before and :after Pseudo-element
Tags: css
Published: 2018-02-10 22:31:36

---
title: "CSS :before and :after Pseudo-element"
published: true
tags: CSS,
canonical_url: http://blog.mandarbadve.com/2014/02/02/css-pseudo-element/
---

_This post was originally published on [blog.mandarbadve.com](http://blog.mandarbadve.com/2014/02/02/css-pseudo-element/)_


The before and after insert content before and after&nbsp;of the element .

Let’s see an example below.

Here is HTML:

```
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc adipiscing tristique dictum. Nunc odio sapien, sagittis a viverra non, consequat sed urna. Nunc blandit mi nisl, ut condimentum mi iaculis ut. Morbi eget ante luctus, venenatis augue sed, condimentum tortor. Aliquam pretium commodo enim, vel consequat lacus dignissim quis. Vivamus tristique luctus egestas. Mauris aliquam enim et velit rhoncus, a tempus neque faucibus. Pellentesque nec erat ut nunc ultrices suscipit eget ac metus. Suspendisse eget auctor eros, ut dignissim ante. Nunc non justo facilisis odio blandit euismod non nec metus. Quisque eu felis nisl. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aliquam tempus consectetur lorem vitae facilisis.
</p>
```

And here is CSS

```
p:before
{
    content:"'";
    font-weight:bold;
}
Â p:after
{
    content:"'";
    font-weight:bold;
}
```

In the above css we have applied: before and :after on the p element. We have set content to single quote and weight of the font is set to bold.

Here how the p element will render to browser.

[![beforeandafter](https://i0.wp.com/blog.mandarbadve.com/wp-content/uploads/2014/02/beforeandafter.png?resize=551%2C191)](https://i0.wp.com/blog.mandarbadve.com/wp-content/uploads/2014/02/beforeandafter.png)

You will see the single quote appears before and after the content of the p element.

You can see live example here&nbsp;[http://jsfiddle.net/mandarBadve/3ye7E/](http://jsfiddle.net/mandarBadve/3ye7E/ "http://jsfiddle.net/mandarBadve/3ye7E/")
Using another private key with git
Tags: osx, bash, ssh, git
Published: 2014-08-05 09:57:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Using another private key with git
slug: using-another-private-key-with-git
date: 2014-08-05 09:57
tags: 
 - osx
 - bash
 - ssh
 - git
---
It's quite normal to have different private keys for different git servers, but how do you provide a different identity file like you do with SSH?

The answer comes in a text file; `config`.

Create a text file in your ssh directory, which is usually `.ssh`:

    $ touch ~/.ssh/config

Then open it with your favourite text editor, for me, this is currently atom:

    $ atom ~/.ssh/config

Now, we can use this file to configure different hosts. The following should be pretty self explanatory. For your information, in case you're a bit confused, the identity file is your private key.

    Host example.com
        HostName git.example.com
        User git
        IdentityFile /Users/adam/.ssh/yourkey
        IdentitiesOnly yes

You'll notice the host and hostname are different. This means you can have a host configured for example.com which actually points to another hostname, such as a source control server, e.g. git.example.com.
A Handy C# Async Utility Method
Tags: asynchronous, csharp, utility, programming
Published: 2018-02-10 22:32:07

---
title: "A Handy C# Async Utility Method"
published: true
tags: asynchronous,csharp,utility,Programming
canonical_url: https://techblog.djs-consulting.com/2014/a-handy-c-sharp-async-utility-method.html
---

In the course of writing C# code utilizing the new (for 4.5.1) [Task-based asynchronous programming](//msdn.microsoft.com/EN-US/library/vstudio/hh191443(v=vs.110).aspx "Asynchronous Programming with Async and Await - MSDN"), I’ve run across a couple of places where the “await keyword either is not allowed (a catch block or a property accessor) or the “async keyword greatly complicates the syntax (lambda expressions). I’ve found myself writing this method for two different projects, and so I thought I would drop this Q&D, more-comments-than-code utility method here for others to use if you see the need.

_(UPDATE: This works well in console applications; it can cause deadlocks in desktop and web apps. Test before you rely on it.  FURTHER UPDATE: to get around this, add `.ConfigureAwait(false)` after the `Task.WaitAll` call.)_

```
/// <summary>
/// Get the result of a task in contexts where the "await" keyword may be prohibited
/// </summary>
/// <typeparam name="T">The return type for the task</typeparam>
/// <param name="task">The task to be awaited</param>
/// <returns>The result of the task</returns>
public static T TaskResult<T>(Task<T> task)
{
    Task.WaitAll(task);
    return task.Result;
}
```

And, in places where you can’t do something like this…

```
/// <summary>
/// A horribly contrived example class
/// </summary>
/// <remarks>Don't ever structure your POCOs this way, unless EF is handling the navigation properties</remarks>
public class ExampleClass
{
    /// <summary>
    /// A contrived ID to a dependent entity
    /// </summary>
    public int ForeignKeyID { get; set; }

    /// <summary>
    /// The contrived dependent entity
    /// </summary>
    public DependentEntity DependentEntity
    {
        get
        {
            // Does not compile; can't use await without async, can't mark a property as async
            return await Data.DependentEntities
                .FirstOrDefaultAsync(entity => entity.ID == ForeignKeyID);
        }
    }
}
```

…you can instead do this in that “DependentEntity property…

```
    /// <summary>
    /// The contrived dependent entity
    /// </summary>
    public DependentEntity DependentEntity
    {
        get
        {
            return UtilClass.TaskResult<DependentEntity>(Data.DependentEntities
                .FirstOrDefaultAsync(entity => entity.ID == ForeignKeyID));
        }
    }
```

_(UPDATE on dev.to post [4 Aug 2017]: I've learned much regarding C# and `async`/`await`. If your external dependency defines a non-`async` API, use it instead of wrapping it with this.)_


_This post was originally published on [techblog.djs-consulting.com](https://techblog.djs-consulting.com/2014/a-handy-c-sharp-async-utility-method.html)_
boot2docker DNS not working
Tags: docker, boot2docker, osx
Published: 2014-08-04 16:26:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: boot2docker DNS not working
slug: boot2docker-dns-not-working
date: 2014-08-04 16:26
tags: 
 - docker
 - boot2docker
 - osx
---
If you're using Docker on OSX, then you'll be using a VM to run your Docker service on, as it needs Linux, not Unix. The most popular of these seems to be boot2docker, though dvm also seems to be quite popular. Other solutions are available.

I have a problem where sometimes boot2docker's DNS just doesn't seem to work.

I found some instructions on how to fix it though:

    $ boot2docker ssh
    $ sudo udhcpc
    udhcpc (v1.22.1) started
    Sending discover...
    Sending select for 10.0.2.15...
    Lease of 10.0.2.15 obtained, lease time 86400
    deleting routers
    route: SIOCDELRT: No such process
    adding dns 192.168.1.1    
    $ sudo /etc/init.d/docker restart
    $ exit

Now if you attempt to ping Google, it should work!
Linux permissions cheatsheet
Tags: linux, cheatsheet, ops
Published: 2019-11-19 23:54:09

---
title: Linux permissions cheatsheet
published: true
date: 2014-06-15 00:00:00 UTC
tags: linux, cheatsheet, ops
canonical_url: http://hakunin.com/permissions
---

## chmod [a]bcd

| bit | scope | description |
| --- | --- | --- |
| a |   | sticky:1, setgid:2, setuid:4 (optional, default: 0) |
| b | owner | x:1/w:2/r:4 - xw:3/xr:5/wr:6/xwr:7 |
| c | group | x:1/w:2/r:4 - xw:3/xr:5/wr:6/xwr:7 |
| d | everyone | x:1/w:2/r:4 - xw:3/xr:5/wr:6/xwr:7 |

- _Note: only file/dir owner can chmod it_
- _Note: scripts need both `x` and `r` permissions to execute__(that’s because scripts are **read** into interpreter)_  
_(only `r` is enough if ran via `ruby script.rb`, `sh script.sh`)_

## files

| bit setting | meaning |
| --- | --- |
| sticky on files | no effect |
| setgid on execable binaries | no matter who executes, process runs as file’s group |
| setuid on execable binaries | no matter who executes, process runs as file’s owner |
| setuid/setgid on scripts | ignored due to security issues |
| setuid/setgid on non-execables | no effect<sup id="fnref:1"><a href="#fn:1">1</a></sup> |

**Warning:** _setuid_ is dangerous

## directories

| bit setting | meaning |
| --- | --- |
| x on dirs | `cd`, `stat` (e.g. `ls -l`), inode lookup (access files) |
| w on dirs | add/delete/rename files (requires `x` for inode lookup) |
| r on dirs | `ls` |

- _Note: having `xw` on a dir is enough to delete any file in it__(unless it has sticky bit)_

### sticky on dirs

- only used when writable by group/everyone
- files in dir can only be edited/deleted by their owner (think `/tmp`)
- symlinks only work if target is within this dir

### setgid on dirs

- all files/subdirs created by anyone in this dir inherit its group
- all subdirs inherit this bit when created

### setuid on dirs

- no effect

## sources

- [https://en.wikipedia.org/wiki/Chmod](https://en.wikipedia.org/wiki/Chmod)
- [http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm](http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm)
- [https://major.io/2007/02/13/chmod-and-the-mysterious-first-octet/](https://major.io/2007/02/13/chmod-and-the-mysterious-first-octet/)

<!--meta
  date: "2014-06-15"
  tldr: Make sense of chmod flags' behavior
-->

1. There is an exception. See “SUID and SGID on non-executable files” on [this page](http://content.hccfl.edu/pollock/AUnix1/FilePermissions.htm).
Remove branch from remote git repo
Tags: git
Published: 2014-08-04 12:35:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: Remove branch from remote git repo
slug: remove-branch-from-remote-git-repo
date: 2014-08-04 12:35
tags: 
 - git
---
To remove a branch from a remote git repository, you have to push an empty branch.

    $ git push origin :branch-name
    - [deleted]        branch-name

If you want to also remove it from the local repo, delete the branch:

    $ git checkout master 
    Switch to branch 'master'

    $ git branch -D branch-name
    Deleted branch branch-name (was abcd123)

We change branch as you can't delete the branch you're on.