<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>sysadm.cz</title>
 <link href="http://0.0.0.0:4000/atom.xml" rel="self"/>
 <link href="http://0.0.0.0:4000/"/>
 <updated>2026-04-12T11:01:07-05:00</updated>
 <id>http://0.0.0.0:4000</id>
 <author>
   <name></name>
   <email></email>
 </author>

 
 <entry>
   <title>Welcome to Jekyll!</title>
   <link href="http://0.0.0.0:4000/jekyll/update/2022/09/28/welcome-to-jekyll.html"/>
   <updated>2022-09-28T13:40:51-05:00</updated>
   <id>http://0.0.0.0:4000/jekyll/update/2022/09/28/welcome-to-jekyll</id>
   <content type="html">&lt;p&gt;You’ll find this post in your &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;

&lt;p&gt;To add new posts, simply add a file in the &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory that follows the convention &lt;code class=&quot;highlighter-rouge&quot;&gt;YYYY-MM-DD-name-of-post.ext&lt;/code&gt; and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.&lt;/p&gt;

&lt;p&gt;Jekyll also offers powerful support for code snippets:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hi, &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Tom'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints 'Hi, Tom' to STDOUT.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Check out the &lt;a href=&quot;https://jekyllrb.com/docs/home&quot;&gt;Jekyll docs&lt;/a&gt; for more info on how to get the most out of Jekyll. File all bugs/feature requests at &lt;a href=&quot;https://github.com/jekyll/jekyll&quot;&gt;Jekyll’s GitHub repo&lt;/a&gt;. If you have questions, you can ask them on &lt;a href=&quot;https://talk.jekyllrb.com/&quot;&gt;Jekyll Talk&lt;/a&gt;.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Better CLI status for Apache Solr</title>
   <link href="http://0.0.0.0:4000/2016/06/21/Better-status-for-solr.html"/>
   <updated>2016-06-21T00:00:00-05:00</updated>
   <id>http://0.0.0.0:4000/2016/06/21/Better-status-for-solr</id>
   <content type="html">&lt;p&gt;&lt;img alt=&quot;solr&quot; src=&quot;/public/images/solr.png&quot; align=&quot;left&quot; style=&quot;margin: 0px 15px 0px 15px; float: right;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Our team have some &lt;a href=&quot;http://lucene.apache.org/solr/&quot; target=&quot;_blank&quot;&gt;Apache Solr&lt;/a&gt; servers in two clusters. But WebUI is for us realy cluttering, when you have more collections and shards.&lt;/p&gt;

&lt;p&gt;As you can see, this is not realy useful.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;&lt;img alt=&quot;solr-graph&quot; src=&quot;/public/images/solr-graph.png&quot; align=&quot;middle&quot; style=&quot;margin: 0px 15px 0px 15px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So I wrote script for monitor state of solr cluster. This script get information from API and show it in table (script use &lt;a href=&quot;https://pypi.python.org/pypi/tabulate&quot; target=&quot;_blank&quot;&gt;tabulate&lt;/a&gt;). You can see it on my &lt;a href=&quot;https://github.com/v1dlak/solr/blob/master/solr-status&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: I dont know yet if state &lt;code&gt;recovery failed&lt;/code&gt; is in &lt;code&gt;/solr/admin/collections?action=clusterstatus&lt;/code&gt; (but &lt;code&gt;gone&lt;/code&gt; state is in API as &lt;code&gt;down&lt;/code&gt; :-( ). So we will see...&lt;/p&gt;

&lt;p&gt;Enjoy. Next i will write about bad default balance policy in Solr.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;solr-status&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;sksolr1.ng(sksolr1.ng):~ # solr-status -H sksolr1.ko.seznam.cz
+---------+-----------+-------+----------+--------------+--------+-------------------+
| server  |   leaders |   all |   active |   recovering |   down |   recovery failed |
+=========+===========+=======+==========+==============+========+===================+
| sksolr1 |       110 |   219 |      219 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr2 |       111 |   219 |      219 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr3 |       110 |   222 |      222 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr4 |       110 |   222 |      222 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr5 |       109 |   221 |      221 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr6 |       110 |   220 |      220 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr7 |       110 |   219 |      219 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+
| sksolr8 |       110 |   218 |      218 |            0 |      0 |                 0 |
+---------+-----------+-------+----------+--------------+--------+-------------------+

countshards  = 880
countleaders = 880
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

</content>
 </entry>
 
 <entry>
   <title>One more step to autodeploy</title>
   <link href="http://0.0.0.0:4000/2016/04/08/One-more-step-to-autodeploy.html"/>
   <updated>2016-04-08T00:00:00-05:00</updated>
   <id>http://0.0.0.0:4000/2016/04/08/One-more-step-to-autodeploy</id>
   <content type="html">&lt;p&gt;&lt;img alt=&quot;saltstack&quot; src=&quot;/public/images/saltstack.png&quot; align=&quot;left&quot; style=&quot;margin: 0px 15px 0px 15px; float: right;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For maintenance of our servers we use &lt;a href=&quot;http://saltstack.com/&quot; target=&quot;_blank&quot;&gt;Satl Stack&lt;/a&gt;. Few days ago we installed packages from states and define versions in pillars. So we had for every cluster some states (e.g. workers.sls, launchers.sls, masters.sls). When we wanted add some package we had to edit state and pillar. Additionally, if we had to adjust config for this package we had edit more states. One day we said we have to find better way for install package. The way where deployers can edit (via merge request to our gitlab - where we have our salt states with pillars) configs and versions that are in productions servers.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;We had states and pillars in this format.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;state-launcher.sls&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;clusterlauncher:
  pkg.installed:
    - name:
      - szn-email-job: &amp;#123;&amp;#123; pillar['szn-email-job'] &amp;#125;&amp;#125;
      - szn-email-activity: &amp;#123;&amp;#123; pillar['szn-email-activity'] &amp;#125;&amp;#125;
      - szn-fulltext-generator: &amp;#123;&amp;#123; pillar['szn-fulltext-generator'] &amp;#125;&amp;#125;
      - szn-fulltext-dump: &amp;#123;&amp;#123; pillar['szn-fulltext-dump'] &amp;#125;&amp;#125;
    - refresh: True
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;b&gt;pillar-cluster.sls&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;szn-email-job: 0.1.0
szn-email-activity: 0.0.17
szn-fulltext-generator: 0.1.21
szn-fulltext-dump: 0.0.3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We made adjustments to our states and pillars. What we want know about package? We want to know where to install package, his version and config file. So we chose this format for our new pillars.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;new-pillar-cluster.sls&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;#there is two ways for define package for install
# 1)
#   package-name: 0.0.1
#
# 2)
#   package-name:
#     version: 0.0.1
#    [conf-src: salt://path/to/conf]
#    [conf-dst: /path/to/conf/on/server]
pkgs:
  - clusterlauncher\d+\.ng\.seznam\.cz:
    szn-email-job: 0.1.0
    szn-email-activity:
      version: 0.0.17
      conf-src: salt://conf/szn-email-activity/
      conf-dst: /www/szn-email-activity/conf/
    szn-fulltext-generator: 0.1.21
    szn-fulltext-dump:
      version: 0.0.3
      conf-src: salt://conf/szn-fulltext-dump/config.xml
      conf-dst: /www/szn-fulltext-dump/conf/config.xml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You will se that is optionally if we use conf or not. Plus we can copy one file or directory (if conf-dst last char is &quot;/&quot;). After this we must deploy state for installation packages and copy configs. But there was problem. Jinja can`t work with regex. Really! So we had to add workaround via salt module.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;my_re.py&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;import re

def match(pattern, st, flags=0):
  return re.match(pattern, st, flags)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Ok. After this we can finaly deploy states. We wrote two states: &lt;/p&gt;

&lt;p&gt;&lt;b&gt;pkg-regex-install.sls&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;&amp;#123;&amp;#37; if pillar['pkgs'] is defined &amp;#37;&amp;#125;

regex-install:
  pkg.installed:
    - pkgs:
#### we can`t have empty list of pkgs for install (when for loop is empty) ####
      - apt
&amp;#123;&amp;#37; for regex, pkgs in salt['pillar.get']('pkgs', &amp;#123;&amp;#125;).iteritems() &amp;#37;&amp;#125;
  &amp;#123;&amp;#37; if salt['my_re.match'](regex, grains['fqdn']) != None &amp;#37;&amp;#125;
    &amp;#123;&amp;#37; for pkg, metadata in pkgs.iteritems() &amp;#37;&amp;#125;
      &amp;#123;&amp;#37; if 'version' in metadata &amp;#37;&amp;#125;
      - &amp;#123;&amp;#123; pkg &amp;#125;&amp;#125;: &amp;#123;&amp;#123; metadata['version'] &amp;#125;&amp;#125;
      &amp;#123;&amp;#37; else &amp;#37;&amp;#125;
      - &amp;#123;&amp;#123; pkg &amp;#125;&amp;#125;: &amp;#123;&amp;#123; metadata &amp;#125;&amp;#125;
      &amp;#123;&amp;#37; endif &amp;#37;&amp;#125;
    &amp;#123;&amp;#37; endfor &amp;#37;&amp;#125;
  &amp;#123;&amp;#37; endif &amp;#37;&amp;#125;
&amp;#123;&amp;#37; endfor &amp;#37;&amp;#125;
    - refresh: True

&amp;#123;&amp;#37; endif &amp;#37;&amp;#125;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;b&gt;config-regex.sls&lt;/b&gt;&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;&amp;#123;&amp;#37; if pillar['pkgs'] is defined &amp;#37;&amp;#125;

&amp;#123;&amp;#37; for regex, pkgs in salt['pillar.get']('pkgs', &amp;#123;&amp;#125;).iteritems() &amp;#37;&amp;#125;
  &amp;#123;&amp;#37; if salt['my_re.match'](regex, grains['fqdn']) != None &amp;#37;&amp;#125;
    &amp;#123;&amp;#37; for pkg, metadata in pkgs.iteritems() &amp;#37;&amp;#125;
      &amp;#123;&amp;#37; if 'conf-dst' in metadata &amp;#37;&amp;#125; 
&amp;#123;&amp;#123; metadata['conf-dst'] &amp;#125;&amp;#125;:
        &amp;#123;&amp;#37; if metadata['conf-dst'][-1] == &quot;/&quot; &amp;#37;&amp;#125;
  file.recurse:
        &amp;#123;&amp;#37; else &amp;#37;&amp;#125;
  file.managed:
        &amp;#123;&amp;#37; endif &amp;#37;&amp;#125;
    - source: &amp;#123;&amp;#123; metadata['conf-src'] &amp;#125;&amp;#125;
    - template: jinja
      &amp;#123;&amp;#37; endif &amp;#37;&amp;#125;
    &amp;#123;&amp;#37; endfor &amp;#37;&amp;#125;
  &amp;#123;&amp;#37; endif &amp;#37;&amp;#125;
&amp;#123;&amp;#37; endfor &amp;#37;&amp;#125;

&amp;#123;&amp;#37; endif &amp;#37;&amp;#125;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now when we want to add some package we edit only one file. Plus deployers can themself send merge request with his changes in config or version. Then sysadmin only check changes and run &lt;code&gt;state.highstate&lt;/code&gt; on salt master to server.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Azkaban workflow manager + eboshi</title>
   <link href="http://0.0.0.0:4000/2016/02/16/Azkaban-eboshi.html"/>
   <updated>2016-02-16T00:00:00-06:00</updated>
   <id>http://0.0.0.0:4000/2016/02/16/Azkaban-eboshi</id>
   <content type="html">&lt;p&gt;&lt;img alt=&quot;azkaban&quot; src=&quot;/public/images/azkaban-flow.png&quot; align=&quot;left&quot; style=&quot;margin: 0px 15px 0px 15px; float: right;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Some days ago we looked for some scheduler for execute our MapReduce jobs. We chose &lt;a href=&quot;https://github.com/azkaban/azkaban&quot; target=&quot;_blank&quot;&gt;Azkaban&lt;/a&gt; workflow manager and &lt;a href=&quot;https://github.com/wyukawa/eboshi&quot; target=&quot;_blank&quot;&gt;eboshi&lt;/a&gt; (because we wanted autodeploy via Salt Stack). Now I want to write about our experiences with this project.&lt;/p&gt;

&lt;!--more--&gt;

&lt;ul&gt;
&lt;lh&gt;What we installed:&lt;/lh&gt;
&lt;li&gt;mysql&lt;/li&gt;
&lt;li&gt;azkaban-webserver&lt;/li&gt;
&lt;li&gt;azkaban-executor&lt;/li&gt;
&lt;li&gt;eboshi&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We edited azkaban-webserver and azkaban-executor start scripts for Daemontools.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;azkaban-web-start.sh
@@ -45,7 +45,5 @@
 fi
 AZKABAN_OPTS=&quot;$AZKABAN_OPTS -server -Dcom.sun.management.jmxremote -Djava.io.tmpdir=$tmpdir -Dexecutorport=$executorport -Dserverpath=$serverpath&quot;
 
-java $AZKABAN_OPTS $JAVA_LIB_PATH -cp $CLASSPATH azkaban.webapp.AzkabanWebServer -conf $azkaban_dir/conf $@ &amp;amp;
-
-echo $! &amp;gt; $azkaban_dir/currentpid
+exec java $AZKABAN_OPTS $JAVA_LIB_PATH -cp $CLASSPATH azkaban.webapp.AzkabanWebServer -conf $azkaban_dir/conf $@ &amp;gt;&amp;gt; $azkaban_dir/log/azkaban-web-`date +%F`.log
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When we had azkaban webserver and executor online, we created some flows for our job. Like this &lt;code&gt;budgetupdatercpi-r.job&lt;/code&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;# budgetupdater cpi daily reaggregation job
type=command
dependencies=impressfraud-r
command=/etc/init.d/szn-sklik-budgetupdater daily-azkaban cpi ${date}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With help of these defined files we can create extensive flow like this&lt;p&gt;
&lt;p&gt;&lt;img alt=&quot;azkaban-complete-flow&quot; src=&quot;/public/images/azkaban-complete-flow.png&quot; align=&quot;middle&quot; style=&quot;margin: 0px 15px 0px 15px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;History graph of some flow executions look like this. This is a really good helper when your jobs execution time incomprehensible rises.&lt;p&gt;
&lt;p&gt;&lt;img alt=&quot;azkaban-graph&quot; src=&quot;/public/images/azkaban-graph.png&quot; align=&quot;middle&quot; style=&quot;margin: 0px 15px 0px 15px;&quot; /&gt;&lt;/p&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;eboshi and autodeploy&lt;/h2&gt;

&lt;p&gt;Because we have self signed certificate for azkaban webserver we had to edit every requests call in eboshi.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;-r = requests.post(url + &quot;/schedule&quot;, data=params)
+r = requests.post(url + &quot;/schedule&quot;, verify=False, data=params)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The schedules are created automatically from this &lt;a href=&quot;https://docs.saltstack.com/en/latest/topics/pillar/&quot; target=&quot;_blank&quot;&gt;pillar&lt;/a&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;scheduler:
  clicklinkerspark:
    time: 00,02,AM,CET
    period: 1d
  clicklinkerspark-inc:
    time: 00,02,AM,CET
    period: 30m
  coeccompressor-daily:
    time: 00,57,AM,CET
    period: 1d
  patternwebsaggregator:
    time: 06,02,AM,CET
    period: 1d
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This salt state calls eboshi and creates all scheludes defined in pillar in this for loop.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;&amp;#123;&amp;#37; for flow, metadata in salt['pillar.get']('scheduler', &amp;#123;&amp;#125;).iteritems() &amp;#37;&amp;#125;
&amp;#123;&amp;#123; flow &amp;#125;&amp;#125;-create-schedule:
  cmd.run:
    - name: /usr/local/bin/eboshi addSchedule --url https://&amp;#123;&amp;#123; grains['fqdn'] &amp;#125;&amp;#125;:8443 --username admins6 --password &amp;#123;&amp;#123; pillar['pass.azkaban.admins6'] &amp;#125;&amp;#125; --project sklik --flow &amp;#123;&amp;#123; flow &amp;#125;&amp;#125; --date 01/01/2016 --time &amp;#123;&amp;#123; metadata['time'] &amp;#125;&amp;#125; --period &amp;#123;&amp;#123; metadata['period'] &amp;#125;&amp;#125;
&amp;#123;&amp;#37; endfor &amp;#37;&amp;#125;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;At pillar are defined versions of packages our jobs. Nowadays when we want edit/add some schedule we only edit pillar file and call &lt;code&gt;salt &quot;HOSTNAME&quot; state.highstate&lt;/code&gt;. This call update our package and set all schedules.&lt;/p&gt;
&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Corrupt blocks in HDFS?</title>
   <link href="http://0.0.0.0:4000/2016/01/07/Inconsistency-jmx-hbck.html"/>
   <updated>2016-01-07T00:00:00-06:00</updated>
   <id>http://0.0.0.0:4000/2016/01/07/Inconsistency-jmx-hbck</id>
   <content type="html">&lt;p&gt;&lt;img alt=&quot;hadoopbinary&quot; src=&quot;/public/images/hadoopbinary.png&quot; align=&quot;left&quot; style=&quot;margin: 0px 15px 0px 15px; float: right;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Few weeks ago we saw corrupt blocks in HDFS in jmx output (like http://namenode:50070/jmx). So we didn't start panic and run fsck. Hadoop fsck output said status &lt;b&gt;HEALTHY&lt;/b&gt; and this was true.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code&gt;...
    &quot;PendingReplicationBlocks&quot; : 0,
    &quot;UnderReplicatedBlocks&quot; : 0,
    &quot;CorruptBlocks&quot; : 5,
    &quot;ScheduledReplicationBlocks&quot; : 0,
    &quot;PendingDeletionBlocks&quot; : 0,
...&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Result: Dont trust jmx everytime!&lt;/p&gt;

&lt;p&gt;&lt;u&gt;UPDATE:&lt;/u&gt; same situation is in HBase jmx and Regions In Transition (ritcount). We had some RIT, but jmx sayed &lt;code&gt;&quot;ritCount&quot;:0&lt;/code&gt;. JMX is bigger and biiger liars every day.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Upgrade OpsCenter to version 5.2.2</title>
   <link href="http://0.0.0.0:4000/2015/12/05/Upgrade-opscenter.html"/>
   <updated>2015-12-05T00:00:00-06:00</updated>
   <id>http://0.0.0.0:4000/2015/12/05/Upgrade-opscenter</id>
   <content type="html">&lt;p&gt;&lt;img alt=&quot;opscenter-nodata&quot; src=&quot;/public/images/nodata.png&quot; align=&quot;left&quot; style=&quot;margin: 0px 15px 0px 15px; float: right;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Today I decided how I upgraded OpsCenter on one of us cluster. One of reasons was that box &quot;Cluster Health&quot; still loading only and I want try the newest version.&lt;/p&gt;

&lt;p&gt;This bring me some throuble (like every upgrade :-)). First I had to upgrade all datastax-agents on each node. After that on WebUI OpsCenter I saw &quot;No Data&quot; in some boxes (specifically a &quot;write requests&quot;, &quot;disk utilization&quot;, &quot;write request latency&quot; and &quot;load&quot;).&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Solution for this &quot;No Data&quot; trouble was some alters in cassandra keyspace for OpsCenter.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;mysql&quot; data-lang=&quot;mysql&quot;&gt;ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; ADD message text;
ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; ADD column_family text;
ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; ADD target_node text;
ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; ADD event_source text;
ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; ADD &quot;keyspace&quot; text;
ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; ADD api_source_ip text;
ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; ADD user text;
ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; ADD source_node text;
ALTER TABLE &quot;OpsCenter&quot;.&quot;events&quot; with comment = '{&quot;info&quot;: &quot;OpsCenter management data.&quot;, &quot;version&quot;: [5, 2, 2]}';
ALTER TABLE &quot;OpsCenter&quot;.&quot;rollups60&quot; RENAME column1 to timestamp;
ALTER TABLE &quot;OpsCenter&quot;.&quot;rollups60&quot; with comment = '{&quot;info&quot;: &quot;OpsCenter management data.&quot;, &quot;version&quot;: [5, 2, 2]}';
ALTER TABLE &quot;OpsCenter&quot;.&quot;rollups300&quot; RENAME column1 to timestamp;
ALTER TABLE &quot;OpsCenter&quot;.&quot;rollups300&quot; with comment = '{&quot;info&quot;: &quot;OpsCenter management data.&quot;, &quot;version&quot;: [5, 2, 2]}';
ALTER TABLE &quot;OpsCenter&quot;.&quot;rollups7200&quot; RENAME column1 to timestamp;
ALTER TABLE &quot;OpsCenter&quot;.&quot;rollups7200&quot; with comment = '{&quot;info&quot;: &quot;OpsCenter management data.&quot;, &quot;version&quot;: [5, 2, 2]}';
ALTER TABLE &quot;OpsCenter&quot;.&quot;rollups86400&quot; RENAME column1 to timestamp;
ALTER TABLE &quot;OpsCenter&quot;.&quot;rollups86400&quot; with comment = '{&quot;info&quot;: &quot;OpsCenter management data.&quot;, &quot;version&quot;: [5, 2, 2]}';
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After this i saw data in all graph. Next step was increase replication factor on keyspace &quot;Opscenter&quot; and run &quot;nodetool repair&quot;. This was rather tuning that upgrade step.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;cqlsh&amp;gt;&lt;/span&gt; ALTER KEYSPACE &quot;OpsCenter&quot; WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'KO' : 3, 'NG' : 3 };
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After all this steps OpsCenter was still unstable. OpsCenter and datastax-agents had connections trouble so big that the simplest way was drop keyspace for OpsCenter purge opscenter and datastax-agents and install it all again.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;c&quot;&gt;server:~ #&lt;/span&gt; apt-get purge opscenter datastax-agent
&lt;span class=&quot;c&quot;&gt;server:~ #&lt;/span&gt; cqlsh
&lt;span class=&quot;c&quot;&gt;cqlsh &amp;gt;&lt;/span&gt; DROP KEYSPACE &quot;OpsCenter&quot;;
&lt;span class=&quot;c&quot;&gt;cqlsh &amp;gt;&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;server:~ #&lt;/span&gt; apt-get install opscenter datastax-agent
&lt;span class=&quot;c&quot;&gt;server:~ #&lt;/span&gt; service opscenter start
&lt;span class=&quot;c&quot;&gt;server:~ #&lt;/span&gt; service datastax-agent
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After this Opscenter looks fine and we haven't one problem with that.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Welcome to my new page</title>
   <link href="http://0.0.0.0:4000/2015/11/24/Welcome.html"/>
   <updated>2015-11-24T00:00:00-06:00</updated>
   <id>http://0.0.0.0:4000/2015/11/24/Welcome</id>
   <content type="html">&lt;p&gt;&lt;img alt=&quot;rasp&quot; src=&quot;/public/images/raspberry.jpg&quot; align=&quot;left&quot; style=&quot;margin: 0px 15px 0px 15px; float: right;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Hi, welcome on my new page, which is running on my Raspberry Pi under my TV :-)&lt;/p&gt;

&lt;p&gt;I am system administrator from Czech Republic and I would like to write about my job. I am team leader BigData admins in &lt;a href=&quot;https://www.seznam.cz&quot; target=&quot;_blank&quot;&gt;Seznam.cz&lt;/a&gt; . Seznam.cz is the most visited web portal in Czech Republic. Homepage has more than 2 million visits per day.&lt;/p&gt;

&lt;p&gt;Our team administers more than 900 physical servers with more than 10PB data. We administer services like Hadoop, Hbase, MapReduce, Yarn, Kafka, Cassandra etc. We use SaltStack, cssh and internal software for installation servers called Puzzle, which makes out job easier.&lt;/p&gt;

&lt;p&gt;So I will write mostly about that and I hope I will write periodically.&lt;/p&gt;

&lt;p&gt;Enjoy your visit.&lt;/p&gt;

</content>
 </entry>
 

</feed>
