I am trying to register Zabbix agent to Zabbix server UI automatically but seems i am missing something but when i am trying to do it via UI(Manually) it is working. can someone help me to do it.
My configurations -
/etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1,{zabbix-server-ip}
ServerActive=DNS Name
HostMetadata=ubuntu (string why which i am doing configuration in UI)
any though on this would be appreciated.
Wrote a script for auto-registration of the Zabbix agent to Zabbix server.
For auto discovery, you need to set rules in Zabbix UI/frontend with HostMetadata under Configuration → Actions. Follow This
Then you can move ahead with script execution on agent
#Note - This script takes zabbixserverip metadatastring as input at runtime sh script.sh internal-dns-name free-string
#!/bin/bash
zabbixserverip=$1
metadatastring=$2
apt update -y
apt install zabbix-agent
sed -i -- 's/Server=127.0.0.1/Server='$zabbixserverip'/g' /etc/zabbix/zabbix_agentd.conf
echo "ServerActive=$zabbixserverip" >> /etc/zabbix/zabbix_agentd.conf
echo "HostMetadata=$metadatastring" >> /etc/zabbix/zabbix_agentd.conf
systemctl restart zabbix-agent
systemctl status zabbix-agent
first, you need to set Server and ServerActive both IP or DNS of zabbix server.
For auto discovery, you need to set rules in zabbix UI/frontend with HostMetadata under Configuration → Actions.
Check if link will help you.
https://www.zabbix.com/documentation/4.2/manual/discovery/auto_registration
You are configuring Server and ServerActive wrong: both need to be set to the IP/DNS of the Zabbix Proxy/Server, no the local IP/DNS.
Related
I'm trying to start install LAMP in my EC2 instance. I have followed all the steps in this website
( https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html )but unable to see the test page coming up once I open my DNS id. Checked whether the service is running by typing in sudo systemctl is-enabled httpd and it comes up as enabled. My port 80 is also open. Please help!
How to create ftp in google cloud compute engine? I can connect via SFTP without any issues, but my company is using a software to connect via FTP to download a XML file from the server. Unfortunately that software doesn't have SFTP connection facilities.
I saw lots of examples from the internet and to connect via SFTP not FTP.
Any idea's or tutorials ?
I found a way to do this, Please advice is there any risks.
apt-get install vsftpd libpam-pwdfile
nano /etc/vsftpd.conf
And inside the vsftpd.conf config file.
# vim /etc/vsftpd.conf
listen=YES
listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
nopriv_user=vsftpd
chroot_local_user=YES
allow_writeable_chroot=yes
guest_username=vsftpd
virtual_use_local_privs=YES
guest_enable=YES
user_sub_token=$USER
local_root=/var/www/$USER
hide_ids=YES
listen_address=0.0.0.0
pasv_min_port=12000
pasv_max_port=12100
pasv_address=888.888.888.888 # My server IP
listen_port=211
Remove everything from the file and add these lines instead
auth required pam_pwdfile.so pwdfile /etc/ftpd.passwd
account required pam_permit.so
Create the main user that will be used by the virtual users to authenticate:
useradd --home /home/vsftpd --gid nogroup -m --shell /bin/false vsftpd
Once that is done we can create our users/passwords file.
htpasswd -cd /etc/ftpd.passwd helloftp
Next, add the directories for the users since vsftpd will not create them automatically.
mkdir /var/www/helloproject
chown vsftpd:nogroup /var/www/helloproject
chmod +w /var/www/helloproject
Finally, start the vsftp daemon and set it to automatically start on system boot.
systemctl start vsftpd && systemctl enable vsftpd
Check the status to make sure the service is started:
systemctl status vsftpd
● vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled)
Active: active (running) since Sat 2016-12-03 11:07:30 CST; 23min ago
Main PID: 5316 (vsftpd)
CGroup: /system.slice/vsftpd.service
├─5316 /usr/sbin/vsftpd /etc/vsftpd.conf
├─5455 /usr/sbin/vsftpd /etc/vsftpd.conf
└─5457 /usr/sbin/vsftpd /etc/vsftpd.conf
Finally add firewall rules to access via cloud.
Later I have changed my IP from 0.0.0.0 for more restriction
Yes, It is possible to host an FTP server on Google Cloud. In fact, I wrote an in-depth blog about How to set up an FTP server on Google Cloud.
If your VM is base on Linux then you have to use an application like vsftpd to set up an FTP server.
Here are the steps:
Step 1: Deploy a Virtual Instance on Google Cloud
Step 2: Open SSH terminal
Step 3: Installing VSFTPD
Step 4: Create a User
Step 5: Configure vsftpd.conf file
Step 6: Preparing an FTP Directory
Step 7: FTP/S or FTP over SSL setup (optional)
Step 8: Opening Ports in Google Cloud Firewall
Step 9: Test and Connect
we have 3 node and trying to setup hdfs and pivotal hawq with ambari and i have already enabled passwordless ssh for all the 3 machines but when i start hawq service i am getting "Setting up passwordless ssh failed for all the HAWQ hosts" this error please help to resolve this issue.
enter image description here
On all of your hosts, edit your /etc/ssh/sshd_config file and change "PasswordAuthentication no" to "PasswordAuthentication yes". This can be done with sed too.
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
Then restart sshd on all of the hosts:
sudo /etc/init.d/sshd restart
Now you can proceed with the installation of HAWQ. The installation is using a command called gpssh-exkeys. This process uses password authentication to communicate with the hosts so that it can create and exchange keys for the gpadmin account. Once the keys have been exchanged, the gpadmin account no longer needs password authentication.
Also, after the installation is complete, you can revert back and disable password authentication if you like.
Lastly, I've asked the PM for HDB at Pivotal to enhance Ambari to do these steps for you automatically. There is a similar process for iptables being disabled during the installation of Hadoop so this would be like that. Ambari would enable password authentication, install HDB, and then disable password authentication.
I'm using boot2docker on OSX 10.10 to try to run the WSO2 governance registry. I cannot reach the app from the host machine (OSX).
Here's my Dockerfile:
FROM dockerfile/java:openjdk-7-jdk
MAINTAINER Andrew Matthews
COPY wso2greg-4.6.0.zip /opt/
RUN unzip /opt/wso2greg-4.6.0.zip -d /opt && \
rm /opt/wso2greg-4.6.0.zip
EXPOSE 9443
CMD ["/opt/wso2greg-4.6.0/bin/wso2server.sh"]
This follows a pattern used by others on docker.io for other wso2 apps.
I built it with:
docker build -t="usmsnp/wso2greg" .
and ran it with
docker run -i -t -P usmsnp/wso2greg
everything seems to proceed nicely - I get as far as the wso2 announcement:
Mgt Console URL : https://172.17.0.27:9443/carbon/
I have the boot2docker vm IP address aliased as dockerhost in my /etc/hosts file, and when I navigate to https://dockerhost:9443/carbon/ using curl I get connection refused.
Any ideas?
UPDATE: 2014-11-28
When I deploy the image to AWS using tutum, it works. So, mission accomplished, I suppose. But I'm still confused about why it doesn't work. I understand that boot2docker requires a different IP address, but I used that.
When you use docker run -P you're telling Docker to allocate a random port on the Docker daemon host - not to use 9443.
So in this case, you'll need to run docker ports <containerid> to find out what port its been mapped to.
alternativly, you need to use docker run -p 9443:9443 ... to tell Docker to map the external 9443 to the container's 9443
Hi everyone
I have a problem.
I stopped service named, exim and dovecot, but after a period of time, these services auto started again. Until now, I don't know why this happen even though, I was tried search for this issue but can't find out anything. please help me how to solve this problem..
Thank you so much!!!
This works for me:
Login as root on your server and force-stop the services:
service named stop
service exim stop
service dovecot stop
Next is to configure VestaCP to not start the services when the server is beeing rebooted:
chkconfig named off
chkconfig exim off
chkconfig dovecot off
And you're done. You can check by rebooting the server. You can also do this with other services:
clamd, spamassasin (if you installed the high ram VestaCP version and don't need the mail services)_
httpd, nginx, mysqld and vsftpd (for if you make a dns-only server)
You get the point, hope this works. Good luck
it just about when you create web domain, but have check the option DNS support and mail support. So, vesta will start service named and dovecot. you just ceate a cronjob with these command:
sudo /usr/local/vesta/bin/v-stop-service dovecot
sudo /usr/local/vesta/bin/v-stop-service named
sudo /usr/local/vesta/bin/v-stop-service exim
or, in the server, add these command line
JOB='8' MIN='0' HOUR='/6' DAY='' MONTH='' WDAY='' CMD='sudo /usr/local/vesta/bin/v-stop-service exim' SUSPENDED='no' TIME='12:32:31' DATE='2014-05-22'
JOB='9' MIN='0' HOUR='/6' DAY='' MONTH='' WDAY='' CMD='sudo /usr/local/vesta/bin/v-stop-service named' SUSPENDED='no' TIME='12:32:05' DATE='2014-05-22'
JOB='10' MIN='0' HOUR='/6' DAY='' MONTH='' WDAY='' CMD='sudo /usr/local/vesta/bin/v-stop-service dovecot' SUSPENDED='no' TIME='12:31:50' DATE='2014-05-22'
if you have any issue, give me message :)