Skip to main content

Posts

Showing posts from July, 2017

Salt stack issues

The function "state.apply" is running as PID Restart salt-minion with command: service salt-minion restart No matching sls found for 'init' in env 'base' Add top.sls file in the directory where your main sls file is present. Create the file as follows: [code language="bash"] base: 'web*': - apache [/code] If the sls is present in a subdirectory elasticsearch/init.sls then write the top.sls as: [code language="bash"] base: '*': - elasticsearch.init [/code] How to execute saltstack-formulas create file  /srv/pillar/top.sls  with content: base : ' * ' : - salt create file  /srv/pillar/salt.sls  with content: salt : master : worker_threads : 2 fileserver_backend : - roots - git gitfs_remotes : - git://github.com/saltstack-formulas/epel-formula.git - git://github.com/saltstack-formulas/git-formula.git - git://github.com/saltstack-formulas/nano-formula.git -

Yum : Operation too slow. Less than 1000 byt es/sec transferred the last 30 seconds

First thing to try is the usual yum clean all You might be running 3rd party repositories and do not have yum-plugin-priorities installed. This could compromise your system, so please install and configure  yum-plugin-priorities . You could also try the following: yum --disableplugin=fastestmirror update. minrate  This sets the low speed threshold in bytes per second. If the server is sending data slower than this for at least  timeout' seconds, Yum aborts the connection. The default is 1000'.   timeout  Number of seconds to wait for a connection before timing out. Defaults to 30 seconds. This may be too short of a time for extremely overloaded sites. You can reduce  minrate  and/or increase  timeoute . Just add/edit these parameters in  /etc/yum.conf [main]  section. For example: [main] ... minrate=1 timeout=300

Diamond installation on centos 7

$  yum install make rpm-build python-configobj python-setuptools $  git clone  https://github.com/python-diamond/Diamond $  cd Diamond $  make buildrpm Then use the package you built like this: $  yum localinstall –nogpgcheck dist/diamond-4.0.449-0.noarch.rpm $  cp /etc/diamond/{diamond.conf.example,diamond.conf} $  $EDITOR /etc/diamond/diamond.conf # Start Diamond service via service manager. $  service diamond start diamond-setup -C ElasticSearchCollector diamond-setup -C NetworkCollector Issues failed to connect socket to ‘/var/run/libvirt/libvirt-sock-ro’ no such file or directory execute: egrep ‘(vmx|svm)’ /proc/cpuinfo 2. If the above commands returns with any output showing vmx or svm then your hardware supports VT else it does not. yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer

Diamond installation on centos 7

$ yum install make rpm-build python-configobj python-setuptools $ git clone https://github.com/python-diamond/Diamond $ cd Diamond $ make buildrpm Then use the package you built like this: $ yum localinstall --nogpgcheck dist/diamond-4.0.449-0.noarch.rpm $ cp /etc/diamond/{diamond.conf.example,diamond.conf} $ $EDITOR /etc/diamond/diamond.conf # Start Diamond service via service manager. $ service diamond start diamond-setup -C ElasticSearchCollector diamond-setup -C NetworkCollector Issues failed to connect socket to '/var/run/libvirt/libvirt-sock-ro' no such file or directory execute: egrep '(vmx|svm)' /proc/cpuinfo 2. If the above commands returns with any output showing vmx or svm then your hardware supports VT else it does not. yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer

Elasticsearch Queries (1)

Create indices 1 2 3 4 5 6 7 8 9 10 curl -XPUT 'localhost:9200/twitter?pretty' -H 'Content-Type: application/json' -d' {   "settings" : {   "index" : {   "number_of_shards" : 3,   "number_of_replicas" : 2   }   } } ' 2. Search 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 curl -XGET 'localhost:9200/sw/_search?pretty' -H 'Content-Type: application/json' -d' {   "query" : { "match_all" : {} },   "_source" : [ "gender" , "height" ] } '< /pre > 3. Creating index and adding documents to it <pre>curl -XPUT 'localhost:9200/my_index?pretty' -H 'Content-Type: application/json' -d' {   "mappings" : {   "my_t