How to monitor virtual IP with zabbix? - centos

in some cluster environments, there are pair servers that are HA 2 by 2. for example i have server1 with IP 22.1.1.1 and server2 with IP 22.1.1.2.
server1 is giving service and server2 is standby. there is this virtual IP 22.1.1.3 that other servers connect to it to get services from server1 and server2.
now i need to monitor this virtual IP to see if it is up and other servers outside its VLAN can connect to it. how i can do this in zabbix?
i don't have an actual physical server to create in zabbix according to this question. i tried to create one but i got errors. also this question is asked 3 years ago. is there any new features i can use to solve this problem?

You can create a host with agent ip 22.1.1.3 and monitor it in agentless mode.
You can ping it (icmpping), connect to a tcp port that you know it's open (net.tcp.service) or, in case of a web service, do a http call with the http agent and react accordingly.
Just create the correct items/templates according to the simple check and http agent documentation.

You do not need a physical server to create a host.
You can create a host with the target IP address and use various items against it - based on your question, you do not need agent items, but some other (remote) type.

Related

How to access my local [WAMP] webserver from outside the LAN?

I am trying to access my local [WAMP] webserver from any remote devide. I am so far able to access it from a device inside the LAN, but fail to do so from outside it. As far as i know, port forwarding is how we achieve this. But currently unable to do that correctly.
Present error when trying to connect :
Some of the articles which i have followed so far are:
general-port-forwarding-guide
how-can-i-access-my-server-from-outside-of-my-lan
how-to-expose-a-local-development-server-to-the-internet
The main steps which i follow are as follows:
Make sure server is accessible inside LAN.
Open router's port forwarding settings and port forward the set static ip address (in step 1). Set port 80 and 8080 for communicating.
Access the server via my public ip (can check public ip and if forwarded port is accessible from here)
This is a temporary solution for testing purposes only with 8 hour server connection duration time limit (and a limited no. of server connections):
access_local_server_remotely_for-Development-And-Testing-Only and here is a video guide about how to use it.

Socket mirror from dynamic IP to a server

Scenario:
I need to have access to a socket server from internet. This server is on a machine that can have a dynamic IP and can be behind router NAT etc and I don't want to configure "port forwarding" dynamic DNS for going out.
My idea is to run socket in a server that client (app) and machine with dynamic IP can connect and the server create data channel from client and master.
Master ----- Socket Mirror with DNS ---- Client (can be more than one)
what is the best way to do this? Backend service like google cloud services? or other ?
The thing you are discussing is about to implement a TCP tunnel, since the question is more general I can't answer with code; I recommend services like ngrok, where it establishes a tunnel between remote server & dynamic IP server, the software is opensource.
NOTE: if you need answer specific to languages search with TCP tunnel.

Unable to make remote desktop after the scale set creation

I have successfully created a scale set using (https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-customimage) with one instance from the my custom image:
The custom image has microsoft server data center DS1 V2 and node.js installed in and a copy of my application.
From the new portal I can see the IP of the VM.
I have also successfully started it from the powershell.
However the RDP on that IP with port 3389 or 50000, 50001 are not working.
I tried to add some inboud rules but the situation is same (may inboud rules not correct).
Please can you let me know the steps required after the scale set is created in order to make a RDP ?
You won't be able to connect to the IP of the VM from outside the VNET as each VM has an internal IP address. You need to connect to the public IP of the load balancer (you probably meant that implicitly but being precise just in case).
You will also need to create inbound NAT rules to map a port range on the load balancer public IP address to port 3389 on the backend, and double check that RDP was enabled on the source image before uploading it.
Take a look at this template for an example of inbound NAT rules.. https://github.com/Azure/azure-quickstart-templates/blob/master/201-vmss-windows-nat/azuredeploy.json

How does a client socket application identify the server application on the same host computer

I have been trying to learn socket programming in C++ and got some progress for the basics. But I understood that basics are not fundamentals.
One of those fundamentals is about the question which is stated in the title. Lets say I have two separate applications running on the same computer. One of them has a server socket and the other one has a client.
When the server gets an IP address automatically, how can client find the server? Do I have to assign an IP address that is known by the client? In that case, maybe that IP address is not available on the network.
Or can client find and connect to the server by sone kind of name or id?
Have the server bind to all interfaces and have the client lookup 'localhost' by name; it's resolved locally, (ie. no external DNS service required), to an IP address stored in a 'hosts' file, and is set by default to 127.0.0.1
Google 'hosts file'
The IP address of any server in the same host is 127.0.0.1 unless the server has bound to a specific, different IP address. As #MartinJames points out, you can use 'localhost' as the hostname for that, except on certain broken Linux distributions.

Redirect domain request to different vm machines

Is it possible somehow to redirect domains to vm machines. I only got 1 ip-address and also would like to use ports twice. Is there some kind of application that could handle this?
Lets say:
domain1.com:80 -> vm machine 1
domain2.com:80 -> vm machine 2
Any chance of sending the request to the host and let the host decide which vm machine the request should go to?
Thanks.
With "1 ip-address" you mean 1 public ip-address, right? The two VMs surely have unique (private) IPs, havn't they?
If you can create a third VM you could install an Apache HTTP server and use virtual hosts and mod_proxy: The virtual host at domain1.com would proxy to VM 1 and the one at domain2.com would proxy to VM 2.