Nagios mail alert configuration - nagios

Recently I configured Nagios with postfix. Whenever server/service is down it used to send mail alerts for every 1 hour till that system/service is up. How can I configure nagios so that it has to send mail alert only once for system/service down and again when status changes to up nagios has to notify me.

In your host/host template/service/service template set notification_interval 0

In your host definition, set notification_interval to 0:
define host{
use generic-host
host_name example
address example.com
notification_interval 0
}

Related

Creating IRule in F5 based on ip_address:portnumber/servletname

I am very new for F5-LTM configuration.Any help related to below requirement will be vary much appreciated.
I have my application on Weblogic-11g server running on managed server at port number : 8001.
Now as my user count has increased i have created one more managed server at port number : 9001
Previously all my request were coming on http://ip_address:8001/login.html
now still i want all request should come from same but they redirect to both http://ip_address:8001/login.html and http://ip_address:9001/login.html
Note : i would also like to inform that in my application i have many other servlet also running so i want request forwarding based on http://ip_address:port_number/servlet
Any body who know How i can achieve my above request forwarding configuration in F5-LTM.
Thanks Again.
I have my application on Weblogic-11g server running on managed server
at port number : 8001. Now as my user count has increased i have
created one more managed server at port number : 9001
I don't think you need a different port and redirection.
You can still run the app on your second server on port 8001. Then you can add both the server under one virtual pool which will be under a virtual IP. Then the user can go to the app by using http://virtualIP:8001/login.html.
When a request is received by the virtual IP it can load balance the request between the two servers which are running the app on the same port 8001.
This is a good documentation in case are interested :
https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-basics-11-6-0.html

Not able to access a port on ec2 instance for an Angular app

I am working on an angular app using the angular cli to set things up. Running the ng serve command spawns a server at this address <my_ec2_host_name>:4200. When I try to access the page on the browser it doesn't work (connection timed out error). I believe this is because of security reasons so I added the following rule to my security groups for the ec2 instance:
Port 4200 should now be accessible but I still can't get the page to load. Can someone think of how to get this to work?
Start angular with below command.
ng serve --host=0.0.0.0 --disable-host-check
it will disable host check and allow to access with IP
You can set up the host option like this:
ng serve -host 0.0.0.0
The steps you are doing are correct for opening a port via Security Groups in the EC2 console. Make sure you are modifying the correct security group, and make sure that your changes have been saved.
Your container may have additional firewalls in place, so you will want to check the OS documentation. For Example, RHEL uses iptables as a further security measure: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security_Guide/sect-Security_Guide-IPTables.html.
That looks correct. Are you sure that your server is running and listening for connections?
You should ssh to that server and verify that the page can be loaded locally. Eg:
curl http://<YOUR HOST IP ADDRESS>:4200
eg: curl http://54.164.10.123:4200
You should be careful to use the public ip address (eg: IPv4 Public IP when you're in the EC2 console). I've run into problems in the past where I've got a server listening on one IP address (often localhost) and not the public ip address.
Also maybe a problem: Is your host inside a VPC of some sort?

How to setup my custom domain on gcloud

I tried using these guides:
https://cloud.google.com/dns/quickstart
https://cloud.google.com/dns/migrating
When I ping my domain, I get a response from my compute-engine external IP address, but my WebApp is not loading.
Am I missing something? I get ERR_CONNECTION_REFUSED
There is not enough information to definitely say what the issue is, but here are some suggestions to troubleshoot.
Have your registrar's name server records been updated?
Make sure the following consistently returns Google's name servers for your zone
$ dig +short NS example.com
Have Google's name server propagated the change?
List your Google name servers -
$ gcloud dns managed-zones describe examplezonename
Verify they have propagated -
$ dig example.com #your_zone_nameserver
Are your A and CNAME records set correctly?
Next you should verify that the DNS reply returns the correct A and CNAME entries.
$ dig example.com A
$ dig example.com CNAME
Have you configured your IP and Firewall settings correctly?
You can follow the troubleshooting guide here or update your question with more details.
It appears that your web server may not be set up correctly and there does not seem to be any process listening on either port 80 or 443.
$ nmap queguia.com
Starting Nmap 7.40 ( https://nmap.org ) at 2017-05-03 12:16 PDT
Nmap scan report for queguia.com (35.184.29.62)
Host is up (0.15s latency).
rDNS record for 35.184.29.62: 62.29.184.35.bc.googleusercontent.com
Not shown: 996 filtered ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp closed http
443/tcp closed https
3389/tcp closed ms-wbt-server
Nmap done: 1 IP address (1 host up) scanned in 10.21 seconds
Caveats
Please also keep in mind that DNS entries are cached and it can take some time for your changes to take effect.
Pings of your external IP are most likely answered by a load balancer and not your instance specifically.
Google Enterprise Support:
All App Engine services run by default (domain.appspot.com). In order to map your service on your own domain name, please read the following article https://cloud.google.com/appengine/docs/standard/python/console/using-custom-domains-and-ssl

Nagios: Disable Host notifcation but enable service notification for local printers

Is it possible to enable notifications for services in NAGIOS but to disable hosts notifications? I have a lot of local printers which don't have a impact when they are down but I want to have a service notification e.g. for "no paper" or "low toner cartridge".
Any experiences? Thank you
There are a couple of options, you can create a new host template to use for printers that inherits from your generic-host template, but turn off the setting to enable host notifications with:
notifications_enabled 0
E.g.
define host{
name generic-printer
use generic-host
notifications_enabled 0
register 0
}
Then each printers host definition could include the line
use generic-printer
in its definition.
Alternately, you could create a brand new printer template similar to the one for generic-host with notifications_enabled disabled and also not including any entry for check_command (which is where the command used to determine if a host is OK is chosen).
Default checks like ping or ssh can be disabled by deleting the service definition in the corresponding machine's .cfg file in the monitoring host. nrpe or nrdp services can be used for checks like low toner cartrige or no paper.
Steps to remove the ping check for printer1:
1- Open the printer1.cfg file in the nagios server to edit. (Usually under .../nagios/configurations/objects/)
2- Find the service definition in printer1.cfg where service_description value is PING and delete this definition.
3- Restart NagiOS. After this, the ping check should not be visible from the nagios web interface too.

how to send event(RPC) to service/application in nagios

I am using nagios to monitor certain services. I want to trigger event when particular services goes in error state. Lets say disk space is full so send event(like RPC ) to particular service which will resolve this issue.How to configure nagios to send such event ?
In nagios, these are called event handlers. You define a command and tell the service to run that under the proper circumstances.

Resources