Skip to main content

Posts

Showing posts from 2013

Profiling Slow Query in Mongodb

To monitor slow queries which are run in a mongodb database, profile  attribute need to be set. There are three profiling levels: 0, 1 and 2. Add the following line into mongo.conf: profile=1 Value 0 disables profiling. Value 1 enables the system to detect and record slow queries which take more time than given threshold value. If the attribute is set to 2, information of all queries are recorded. 

Monitor Glassfish Server With Python

Before monitoring Glassfish Server, it should be configured for this purpose. In admin service, you should edit jmx connector settings properly. For detailed explanation, please visit this link . When the editing is done, it is time to code. First, connection to jmx service should be established. However, to achieve this, JMX java library is required. Oracle doesn't provide this library in any other languages, therefore we are forced to take this action in java. Fortunately, in python, with the help of jpype library, we can open a jvm and use the library. Jython is another option to use java libraries in python environment. For this tutorial, we will use jpype, so it is better to quickly install it.

How to open a new database and a new collection in Mongodb

As contrast to relational databases, mongodb doesn't explicitly open a new database or a collection. User just says to mongodb to use a database no matter it is available currently or not. When a save action is performed, this database is automatically created by mongodb. I will take following actions in mongo shell. Currently, I have following databases in mongodb:  > show dbs local 0.078125GB monitoring 0.203125GB test 0.203125GB

Ubuntu'ya nasıl Monitorix yüklerim?

Monitorix, açık kaynak kodlu sistem izleme yazılımıdır. Kullanıcılara, web arayüzüyle kayıtlı sistemler hakkında birçok bilgi sunar. Bunlardan bazıları; kernel kullanımı, dosya sistemi kullanımı, ağ trafiği, sisteme giriş yapmış kullanıcıların kullanım grafiği... Özelliklerin tüm listesi için linki ziyaret edin. Ubuntu yazılım deposundan yüklemek için: # apt-get update # apt-get install monitorix

Remove a user and its home directory with chef-cookbook

This will be another example for  #Opscode    #Chef . We will just extend the cookbook in the previous post to add a new recipe; we will add some extra lines to attributes file and write new simple recipe. Let's start with attributes file. To remove a user, required attribute is its name. Let's provide it: default['ruser']['name'] = "username" We will add an attribute which will specify whether to remove or keep home directory of removed user. Perhaps, it will be kept in the archive. Therefore, as default I set it false. default['ruser']['removehome'] = false

Simple Chef Cookbook Example - Create a user

To begin writing a cookbook, the first thing you need to do is to create a cookbook with boilerplate content via running knife command: knife cookbook create newuser . For this simple cookbook, we will edit three basic contents; attributes, metadata, recipes. First let's go over metadata. Content of metadata is some hints about cookbooks for the server; dependencies, licence, version and other general information. These helps to do correct deployment to clients.

Chef-Server Yuklenmesi (tr)

Bu post, debian tabanli sistemler icin yazilmistir. Diger sistemler icin sadece komutlar farkli olacaktir, izlenilen adimlar aynidir. 1. Chef-server-install  linkine tiklayin. Buradaki sayfada 'chef-server' tabini secin. Chef-server kurmak istediginiz sunucunun ozelliklerini girin. Size verilen linke kullanarak yukleme dosyasini indirin.