I am trying to build collectd from source and want to explore write_http plugin. However when configure is run, it shows:
write_graphite . . . yes
write_http . . . . . no
write_kafka . . . . . no
How to enable it? Is there some specific dependency needed?
In order to enable the write_http plugin,install the libcurl-devel dependency
apt-get install -y libcurl-devel
Related
In my project I need to configure a AWS bucket download as it always gets read time error or connection error when downloading a fairly large file in my deployment. I have a .aws/config in my root directory and in my dockerfile I use "ADD . ." which adds all the files in the project. To build the image I use Docker compose. However, for some reason it is not using the aws config values. Is there a way to pass these values to Docker so that they are actually used?
This is my "config" file which is in ".aws" in the root of the project.
[default]
read_timeout = 1200
connect_timeout = 1200
http_socket_timeout = 1200
s3 =
max_concurrent_requests = 2
multipart_threshold = 8MB
multipart_chunksize = 8MB
My Dockerfile looks like this:
FROM python:3.7.7-stretch AS BASE
RUN apt-get update \
&& apt-get --assume-yes --no-install-recommends install \
build-essential \
curl \
git \
jq \
libgomp1 \
vim
WORKDIR /app
# upgrade pip version
RUN pip install --no-cache-dir --upgrade pip
RUN pip3 install boto3
ADD . .
I expected that through the "ADD . ." boto3 would use the config file. But that is unfortunately not the case.
Perhaps this would answer your question on why the ADD command didn't work.
Hidden file .env not copied using Docker COPY
Instead of relying on the local config setting of the machine where the docker image is built, you might want to put in the configuration as an explicit file in your repo, which is copied over to ~/.aws/config or anywhere in the container and referenced by setting its path to AWS_CONFIG_FILE; OR use any one of the the methods defined in the AWS documentation below:
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html
wherein you can define your configuration as part of your python code or declare them as environment variables
I want to install aide in slackware but the package manager cannot download aide package. I tried the code below with no luck :
slackpkg install aide
The output shows :
Looking for aide in package list. Please wait . . . Done
No packages match the pattern or install. Try
/usr/sbin/slackpkg reinstall|upgrade
How will I fixt it?
Stock Slackware packages tree doesn't contain aide binary package.
slackbuilds.org has slackbuild script for it here:
https://slackbuilds.org/repository/14.2/system/aide/
So read the README and README.Slackware files and build and install package as usual (manual or using sbopkg from sbopkg.org).
With sbopkg:
# sbopkg -r -i aide
Manual:
# mkdir /tmp/bld; cd /tmp/bld
# wget https://slackbuilds.org/slackbuilds/14.2/system/aide.tar.gz
# tar xf aide.tar.gz
# cd aide
##read README and README.Slackware
# . *info
# wget $DOWNLOAD
# bash *Build
# upgradepkg --install-new /tmp/aide-$VERSION-*t?z
I have installed collectd on my ubuntu machine.
I would like to enable the redis plugin , but its not shipped by default with it. Anyone knows how and where can i download that plugin ?
Before you compile collectd, you need to ensure that the redis plugin's dependency is met, so that the redis-plugin gets compiled.
wget http://credis.googlecode.com/files/credis-0.2.3.tar.gz
tar -xvf credis-0.2.3.tar.gz
cd credis-0.2.3
sudo cp credis-0.2.3/* /usr/include/
cd credis-0.2.3
make
sudo cp -f libcredis.so /usr/lib/
sudo cp -f ./* /usr/include/
Now compile collectd:
wget --no-check-certificate https://collectd.org/files/collectd-5.4.0.tar.gz;
tar -xvf collectd-5.4.0.tar.gz;
cd collectd-5.4.0
./configure &&
In the output, ensure that you don't see libcredis . . . . . . no (credis.h not found). Now-
make
make install
Finally, you need to comment out the following to 'activate' the plugin in collectd's conf-
LoadPlugin redis
<Plugin redis>
<Node example>
Host "localhost"
Port "6379"
Timeout 2000
</Node>
</Plugin>
Now restart collectd for the plugin to work.
Just in case anyone is looking for how to install plugins with yum...
yum list | grep collectd
That should give you a list of the plugins that might be missing...
Then, if you wanted to install the plugin for say nginx:
yum install collectd-nginx.x86_64 -y
Can anyone help me with Installation of solr and configuring it to mysql table.I Have tried almost all tutorials , i tried with Jetty , also tomcat.Still getting errors like Data Handler not defined or could not find solr.It's been a week , i am trying all day
In order to get solr running, (assuming that you've downloaded solr and extract it to a location), just navigate to the jetty folder.
Under that there should be a start.jar.
Just type in java -jar start.jar - this should start Solr under jetty. As simple as that. For all my development purposes, I use this. I wouldn't worry about Tomcat unless the app is ready to be deployed to some server.
In order to get your SOLR instance to pull data from mysql, you need the DataImportHandler configured. This documentation describes it well.
EDIT:
A google search for "solr mysql import" lead me here. It is exactly what you're after, I suppose.
I also had the same issue and it is not easy to find simple tutorial for this. Anyway I found following tutorial and it was useful for me.
http://lasithtechavenue.blogspot.com/2013/11/crawling-mysql-database-with-apache-solr.html
Thanks
Hi Please take a look here.
https://github.com/vikash32/indexing-mysql-table-into-solr
i have tried to make it less messy.
Step1:
Login to Linux and go to root folder opt ie cd /opt/
Step2:
Dowload Solr-6.6.2 from the solr link and use the below command to download solr in linux
Sudo wget http://www-us.apache.org/dist/lucene/solr/6.6.2/solr-6.6.2.tgz
Step3:
Extract the service installation file
Sudo tar xzf solr-6.6.2.tgz solr-6.6.2/bin/install_solr_service.sh --strip-components=2
Step4:
Install solr as a service using the script
sudo bash ./install_solr_service.sh solr-6.6.2.tgz
Step5:To check solr server status
sudo service solr status
Step6:To Start Solr in Cloud mode in RHEL
Go to root directory ie cd /opt/
Then go to solr directory cd /solr
Opt/solr > sudo ./bin/solr start -c -force -s server/solr -p 8983 -z zk1:2181,zk2:2181,zk3:2181
Zk1 is the hostname or ipaddress
Step7: To Create Core on solr
Go to solr directory ie cd /opt/solr
Opt/solr > sudo ./bin/sor/create -c -p 8983,7574 -s 2 -rf 2
-s stands for no of shards
-rf stands for no of replica
I installed memcache in the following way:
1) yum install memcached
2) yum install php-pecl-memcached
3) Also enabled the 'memcached.so' in php.ini
I tested the memcached in the follwing way:
$mc = new Memcache;
$mc->addServer('localhost', 11211);
echo "Server's version: " . $mc->getVersion() ;
But it generates the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - /usr/lib64/php/modules/memcached.so: undefined symbol: php_json_encode in Unknown on line 0
PHP Fatal error: Class 'Memcache' not found in /root/memcacheTest.php on line 2
Thank u.
I don't know PHP well (or at all), but from the error message I'll hazzard a guess that you do not have the PHP JSON extension installed, which is apparently needed by the memchached extension.
Apparently, the JSON extension has been in PHP since version 5.2.0, therefore:
You have an older version and you need to upgrade or install the JSON extension yourself
or
Your operating system distributor supplies the PHP JSON extension in a different package that you have not installed.
There is of course the possibility of a misconfiguration, but I think it's slightly less likely.
This showed memcached.so didn't loaded successfully.
Error shows the reason: json.so should be load before memcached.so
Please use php -m | grep memcached to check whether memcached.so is loaded successfully.
If show memcached, this mean it succeeded.
If show like PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - /usr/lib64/php/modules/memcached.so: undefined symbol: php_json_decode_ex in Unknown on line 0
Here is the solusion:
e.g your php.ini is /etc/php.ini, your php.d is /etc/php.d/
Solution 1
comment 'memcached.so' in php.ini
vim /etc/php.d/memcached.ini
add extension=memcached.so in /memcached.ini
php -m | grep memcached check whether memcached is succeed loaded
Solution 2
rm /etc/php.d/json.ini
add extension=json.so in php.in before extension=memcached.so
php -m | grep memcached check whether memcached is succeed loaded
Can you check and double check user permissions? Additionally, my experience with PHP is that the distribution repository versions of PHP aren't very good. I solved those symbol errors by compiling PHP from the ground up. But that's a very radical and time-consuming solution.
http://pecl.php.net/bugs/bug.php?id=17574&edit=1
Just make sure that extension=json.so is specified BEFORE
extension=memcached.so.
I had placed extension=memcached.so in php.ini, and extension=json.so
was specified in /etc/php.d/json.ini, that is parsed AFTER php.ini.
That is why PHP can't find php_json_encode() at the point of loading
memcached.so.
Also, check that the permissions on memcached.so are the same as the other extensions
Try to install the version 2.0. It helped for me.
yum -y install gcc-c++
wget http://launchpad.net/libmemcached/1.0/0.50/+download/libmemcached-0.50.tar.gz
tar xzf libmemcached-0.50.tar.gz
cd libmemcached-0.50
./configure
make
make install
wget http://pecl.php.net/get/memcached-2.0.0b2.tgz
pecl install memcached-2.0.0b2.tgz
echo 'extension=memcached.so' > /etc/php.d/memcached.ini
service php-fpm restart
cd ..
rm -r libmemcached-0.50*
rm -r memcached-