Disable VM's triggers when hypervisor failed in Zabbix - monitoring

I've got Zabbix Server 4.4 and I'm newabe in custom coniguration of this. Mostly I wanna to reduce mail notyfication. I create groups of hosts which name is hypervisor hostname, but hypervisor host isn't inside. So I'm looking of way to off all triggers in host group when hypervisor failed.
It's even possible in zabbix?

Related

Docker containers not accessible while connected on VPN

I am using docker 19.03.5 in my ubuntu 18.04. Usually, I can access all the containers. Everything is ok but the real problem arises when I connect my machine to a VPN client(Cisco anyconnect). I can not access any containers while as soon as I connected to the VPN. Is there any way so that I can access docker containers even connected to a VPN?
I have faced this problem and tried all possible solutions available in Internet, but nothing worked. It looks like Cisco Anyconnect vpn takes an exclusive control over the routing of the system and any changes made are not showing any effect.
The following worked for me. Instead of Cisco Anyconnect, use OpenConnect VPN. Both uses same protocol. To download:
sudo apt install openconnect network-manager-openconnect network-manager-openconnect-gnome
Reboot your PC and then go to VPN Settings -> Multi-protocol VPN client (open connect) and provide the settings as per your organisation requirement.
That's because the VPN is configured to use full-tunelling. The network administrator should configure a split-tunnelling profile.
Full tuneling:
[PC] ---> [VPN] ---> { all networks
Split Tunneling:
[PC] ------> [VPN] ---> [Configured networks]
\-----> [Internet / other networks]
Another thing you can try is editing the routes.
You can add a route pointing to your container IP and specifying the good network adapter, then you have to set a higher priority on this route than on the default gateway of the VPN.
This issue is not related to Docker daemon / container settings. VPN server configuration is to blame (disabled split-include or prohibited local network access).
Because of that you have limited options how to resolve this:
Ask VPN server administrator to allow split-include (mikrotik terminology)
Check anyconnect client settings for something like "route all traffic thru VPN" and disable it
Create custom static routing on your machine to access specific IP range (servers behind VPN server) thru interface created by anyconect client

How to setup docker machine with Hyper V Internal switch?

I've been practicing docker and docker-swarm for quite sometime. I had created docker-machine's (manager, worker1 and worker2 nodes) using virtualbox and was able to complete the orchestration
Now, I am trying to repeat the same using Hyper-V (using internal v-switch) in my office, but it hung with the following
ERROR: Waiting for the host
My office desktop has got only one NIC, If I create 'external vswitch' and share it using 'network adapter sharing' I lose connectivity to all my office / client related applications
Hence I chose to create hyper-v 'manager' node using 'internal switch'. I also tried setting up MAT and provided IP address to 'internal switch'. But NOTHING worked
Should I need / create a hyper-v external switch prior creating Internal switch ? Or am I doing something wrong with internal switch setup?

Activating Container on Standalone Service Fabric Cluster with Open Network Type Configuration Fails on BeginAssignIpAddress

I am running a single node Standalone Service Fabric dev cluster. The node is installed on a Hyper-V virtual machine with two network adapters attached to the external host network. The first VM net adapter is configured with a static IP address and is used as the cluster endpoint. The second VM net adapter is configured through DHCP and has an IP from the same subnet as the first net adapter.
I have looked at the topic "Service Fabric container networking modes" (https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-networking-modes). I have enabled DnsService, IPProviderEnabled and ContainerNetworkSetup. The step 2. I skipped, because it is applicable to Azure Resource Manager configuration. I have configured the network type to Open in the application manifest. The service is hosting a docker container.
When I publish the application to the cluster I get Warning events in the Microsoft-Service-Fabric\Admin channel with Hosting Category.
Here are the text of some of the messages:
SFApplication1Type_App6:ebanking2016xg_ContainerPkg#257e8304-637b-4e58-bc13-388542cf6d6c#d526398e-e01e-43fd-b1d4-9cba19bd608c:131816448810648848: End BeginAssignIpAddress. Error FABRIC_E_INVALID_OPERATION
Failed to remove enpoint resource file=C:\ProgramData\SF\vm0\Fabric\work\Applications\SFApplication1Type_App6\ebanking2016xg_ContainerPkg.d526398e-e01e-43fd-b1d4-9cba19bd608c.Endpoints.txt. Error=0x80070002. NodeVersion=6.3.176.9494:0:0.
SFApplication1Type_App6:ebanking2016xg_ContainerPkg#257e8304-637b-4e58-bc13-388542cf6d6c#d526398e-e01e-43fd-b1d4-9cba19bd608c:131816448810648848: End(Setup->EndCleanupServicePackageEnvironment due to error FABRIC_E_INVALID_OPERATION): error 0x80070002
End(SetupPackageEnvironment): Id=SFApplication1Type_App6:ebanking2016xg_ContainerPkg#257e8304-637b-4e58-bc13-388542cf6d6c#d526398e-e01e-43fd-b1d4-9cba19bd608c, Version=1.0:1.0:131816452585647419, ErrorCode=FABRIC_E_INVALID_OPERATION
...
Activate: Activate:SFApplication1Type_App6:ebanking2016xg_ContainerPkg#257e8304-637b-4e58-bc13-388542cf6d6c#d526398e-e01e-43fd-b1d4-9cba19bd608c:1.0:1.0:131816452585647419, ErrorCode=FABRIC_E_INVALID_OPERATION, RetryCount=0
This group of warning messages continue to appear on a 10 seconds interval. And the application stays in Activating status on the node.
When I do not set the network type to Open, the application activates successfully using the nat mode.
So a couple of questions emerge:
Is network type Open supported on a Standalone Service Fabric installation?
What is the required configuration on host, guest, cluster, and node level?

Active zabbix agents are becoming unavailable due to DHCP IP change

I am using active Zabbix agents that auto-register themselves to the Zabbix server.
Everything goes well until the DHCP changes the host IP, the host then becomes unavailable in Zabbix... Looking at the host under the hosts list in Zabbix frontend, I can see that it had the old IP.
Is there any way to solve this?
This means that you are actually not using active items. I'd suggest cloning your current template and changing items, LLD rules and LLD prototypes to "Zabbix agent (active)" - then agent IP address changes will not be a concern.

What is the correct way to do Port Forwarding using VMWare

I have created a VM which has a server running at localhost:8675/ which I had wanted to connect to my host machine at the same port for ease of understanding. I was following these to documents for information:
https://www.virtualbox.org/manual/ch06.html
http://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/
When I was in my VMWare Workstation, I clicked on my VM, then did: Edit > Virtual Network Editor. After that, enabled Change Settings which relaunched the window in admin mode. I clicked on the Row with Type NAT and external Connection NAT and in the VMNet Information with the NAT radio button pressed, I clicked the NAT Settings Button.
I said: Add... and then did:
Host: 8675
Type: TCP
VMIP: 127.0.0.1:8675
Description: Port Foward of 8675 from Host to VM.
It looks like everything is good. I say Ok and Apply in succession. It looked like it shut down nat and restarted some services.
I confirmed in the VM, the 127.0.0.1:8675 is correct.
In the HOST, I tried to go to: http://localhost:8675/ and it says: ERR_CONNECTION_REFUSED
I figured this was all I needed to do.
I was looking up some additional information and noticed that some people have had to configure firewalls. I wasnt sure if i needed to though, as I was thinking that the HOST and VM are all in 1 actual machine, it might be entirely self contained.
Is there a critical task I am missing?
I saw this post: https://superuser.com/questions/571196/port-forwarding-to-a-vmware-workstation-virtual-machine
which told me to just adjust it to bridged and use it that way. Does this solve the issue of connecting HOST / VM Issue.
I don't want to say this is the correct answer though as the question itself is particular to NAT, but this is a valid alternative answer that does work.
This is solves the base issue at hand, but not the question.
When you use NAT, the host system and the guest boxes have completely different IP addresses on their virtual subnet, so my guess is that when from the host system you try to connect to localhost:8675 you are actually trying to connect to port 8675 of the host and not of the guest. So don't use the localhost or 127.0.0.1 syntax, but discover the real IP address of the guest and use it.
If your guest is Windows use the ipconfig command, if Linux use ifconfig.
Probably you will also have to configure the firewall on the guest side.
EDIT:
Commenting the sentence "NAT: Used to share the host's IP address.": it probably refers to the IP address of the real ethernet adapter you have on your host and that is shared by host and guests to access the internet. That's not related to the way your host and guests communicate together. For example I use VMware Workstation to run a virtual Linux box in Windows. Selecting NAT, VMware creates a virtual subnet called VMnet8. In this subnet the virtual router has address 192.168.120.0, my Windows host is assigned a virtual ethernet adapter with address 192.168.120.1 and my Linux guest has got address 192.168.120.128. So when I want to access a Samba shared folder from Windows I type "net use * \192.168.120.128" in a Windows command prompt. When I want to access a Windows shared folder from Linux I type "sudo mount.cifs //192.168.120.1/path_to_shared_folder target_folder".
I believe you actually answered your question correctly as I was following it and achieved desired outcome.
IMHO, the error: ERR_CONNECTION_REFUSED indicates that a firewall on your host OS or guest OS (your VM) or on both doesn't allow the communication through the given ports.
The easiest thing would be to try to disable firewalls on boths, your HOST and GUEST OS.
Not sure what are your OSes, but here is just a good guide for setting up firewall rules on Ubuntu

Resources