Zabbix - Include hostname in Grafana notification to MS Teams - notifications

I am using Grafana with Zabbix plugin. I am able to set the alerts but I can't find the way to include the hostname of the affected VM.
I have attached the current configuration and how the alert in MS Teams looks like. I tried using $host ${host} in the message template which didn't work

Related

Can you change anonymous in mysql general_logs?

I have mariadb server, which contains database and i have my website on apache server that connects to this database through PHP and my general logs seems like this:
logs and i dont like it shows "as anonymous" instead of for example "as apache". Can i somehow configure my apache server to integrate with it? Or should i use other logs than general_logs to get information what exactly send that query? My system is Fedora 33.
Some MySQL installations permit users to connect as the anonymous (unnamed) user to the server running on the local host.1
and if you head over to dba forum you find this on how to disable those:
https://dba.stackexchange.com/questions/51452/how-do-you-disable-anonymous-login
Subsequently you want to update your PHP configuration to login with the new credentials.

Connect pgAdmin4 to cloud SQL

I'm trying to connect postgreSQL instance in cloud SQL to my pgAdmin.
And I'm totally confused.
How can i do that?
When you are creating your postgres instance you have to allow access to the ip address from the postgres' client is running.
Create your postgresql instance
In the Create a PostgreSQL instance window give the instance id and password to you postgres user in the “Default user password” section.
Click on “Show configuration options” and locate “Set connectivity”, there You have to give access to Your pc ip address in the “Authorized networks” under “Public IP” section click on “Add network” introduce the ip into the “Network” box and click “done”, You can check the client ip address in the link.
If you are done with the configurations click create.
Now to verify the connectivity from the client to Cloud SQL instance I recommend you to do it the first time with the command line console.
In you pc launch the command line console,
execute : psql -h [postgres instance ip address] -u postgres.
You can follow the official documentation for “Connecting psql Client Using Public IP” in the link.

Splunk email view result link doesn't work

Splunk view results page attaches 8000 port to the link when i click on the view result in the email! In the server setting page the web port is set to 8000 . How do i resolve this ?
Splunk Web
Run Splunk Web
Web port * ---8000
Port 8000 is the default webserver port that the main web url for splunk opens with. As long as I have used splunk I have had no need to change this port. The URL is getting "cut off". What exactly do you mean by this? Can you right click the link and perhaps choose "open in new tab" and see if the URL is any different? Is the entire URL highlighted as a link in the email or are the words "View Results" the link and it is embedded?
I would also double check the alert and verify that you have checked the box for the "Link to the Alert" and the "Link to the Results" in the alert setup page.
If all of this looks ok, check the alert_actions.conf file. In this file you can set the hostname and port you use for web links. It perhaps is configured differently in this file then you would like. You may want make sure the port here is set to 8000 and not 80. Look under "Hostname" for what value is set.
http://docs.splunk.com/Documentation/Splunk/latest/Admin/Alertactionsconf
This is probably you have not link your result to proper host name.
You can link host name in the email settings.
Goto splunk --> setting --> server settings --> Email settings --> update the Link host name parameter with your LB / Splunk server with out port 80
The email link will leverage the settings in 'Settings > Server Settings > General Settings'
Splunk uses the Default host name:Web Port fields to create the URL.
This gets more complicated if you're using a load balancer in front of your search heads.

How to find the global catalog of my network in ADDC?

I'm learning IT right now, and I have this situation.
The employee who was the administrator, got out of the company. But he doesn't leave a documentation to tell me which of my ADDC (Active Directory Domain Controller) is the PDC, I mean I'm interested to fin the global catalog and structure of my network.
Does you know a post from TechNet or some site to find this PDC in Windows Server 2008 R2?
You can either open Active Directory Sites and services, expand sites -> servers and look at the NTDS settings of each server you have, there will be a tick box on the general tab that will be checked if the server is a global catalog.
Alternatively, if you have quite a lot of servers and don't want to have to do this for each one, you can use nslookup:
Find a list of global catalogs using nslookup
As for PDC though, these haven't really existed since windows NT, there is however a PDC emulator FSMO role which is held by one domain controller that you can find using the following command:
dsquery server -hasfsmo pdc
You can see the other FSMO roles here:
Identify Operations Master Roles
You can display the Global Catalog Servers in the domain you are logged in to using Nslookup.exe:
Open a CMD.EXE window.
Type the following command and press Enter:
nslookup gc._msdcs.%USERDNSDOMAIN%
Run the following from a command promt:
nslookup
set type=serv
_gc._tcp."FQDN"

How do I authenticate to view mongodb's http console?

I'm running a mongodb process with the following line:
/usr/bin/mongod --dbpath /var/db/mongo --journal
According to mongodb's docs:
http://www.mongodb.org/display/DOCS/Http+Interface
I should be able to access the http console with http://myhost:28017
When I attempt to access the page it asks for authentication.
According to the docs if security is configured I would need to authenticate. But after looking at mongodb.org/display/DOCS/Security+and+Authentication it seems clear to me I'm not using any authentication. I don't run the process with the --auth option, nor are there any users when I run a db.system.users.find() command.
What's going on here?
I have been able to reproduce this, and this is not the intended behavior. I have filed https://jira.mongodb.org/browse/SERVER-4601 The fix version is 2.1.1
Thank you for bringing this to our attention!
In the meantime, there are two work-arounds:
1) Enter the credentials for authentication in the browser pop-up window
2) Remove all user credentials from each of your DBs (including admin) using db.system.users.remove()
Either of these should allow you to view the http console.
Greetings Brain,
i am using mongo V 2.4.6 and its on default port 27017, its http console is enabled by default but when you try to access from Network it ask for password and i dont know why as i am new to this and dont know the exact reason. by i have a way to access it.
Create a tunnel to your mongo Server and when you access, it wont ask for password. and if you are using putty.
enter host name
go to ssh on left menu options and click +
Than Click on tunnel
in Source port type 28017
in destination type localhost colon port 28017(sorry dont know how to write http url in localhost here in my post)
not click open and provide ssh username and password
now open browser on PC from where you are doing ssh .Type localhost and port 28017
and Boom its accessible and wont ask for username and password. hope it work for you, let me know if u need any help.