- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Ambari Alert logs are not getting generated in /var/log/ambari-server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Folks,
I am trying to debug Ambari alerts , I am not getting logs generated in /var/log/ambari-server/ directory.
HDP -
1) Tried ambari-server restart
2) enabled debug mode mentioned in
tried steps mentioned in
@nsabharwal- Could you please provide some ways to debug
Created ‎12-11-2019 08:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately the classes present inside the "org.apache.ambari.server.state.alert" package does not contain DEBUG messages hence you can not see those debugs. But you can get the Alert Notification related DEBUGs.
As you have referred to other Community threads where you see the "Notification" related DEBUG messages like following:
DEBUG [alert-dispatch-5] EmailDispatcher:142 - Successfully dispatched email to [@.com], so it seems like Ambari is sending email but it is struck somewhere.
So if you want to see "Alert Notification" (like Email Notification/ SMTP notification) related DEBUGs inside your "ambari-server.log" then please try this:
Can you please try this:
1). Edit the "/etc/ambari-server/conf/log4j.properties" file and then Add the following line somewhere at the end of this file.
log4j.logger.org.apache.ambari.server.notifications=DEBUG
2). Restart Amabri Server
# ambari-server restart
3). Tail the ambari-server.log file.
# tail -f /var/log/ambari-server/ambari-server.log
4). As soon as some new alert notification (Like SMTP Alert Notification OR SNMP Alert Notification) will be triggered we should see some logging in the above log file.
.
.
Created ‎12-11-2019 08:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately the classes present inside the "org.apache.ambari.server.state.alert" package does not contain DEBUG messages hence you can not see those debugs. But you can get the Alert Notification related DEBUGs.
As you have referred to other Community threads where you see the "Notification" related DEBUG messages like following:
DEBUG [alert-dispatch-5] EmailDispatcher:142 - Successfully dispatched email to [@.com], so it seems like Ambari is sending email but it is struck somewhere.
So if you want to see "Alert Notification" (like Email Notification/ SMTP notification) related DEBUGs inside your "ambari-server.log" then please try this:
Can you please try this:
1). Edit the "/etc/ambari-server/conf/log4j.properties" file and then Add the following line somewhere at the end of this file.
log4j.logger.org.apache.ambari.server.notifications=DEBUG
2). Restart Amabri Server
# ambari-server restart
3). Tail the ambari-server.log file.
# tail -f /var/log/ambari-server/ambari-server.log
4). As soon as some new alert notification (Like SMTP Alert Notification OR SNMP Alert Notification) will be triggered we should see some logging in the above log file.
.
.
Created ‎12-12-2019 03:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@jsensharma Thank you Sen Sharma. I have set the settings you mentioned in log4j.properties file.. will update shortly if I am able to see the ambari alert logs getting generated.
Created ‎12-16-2019 04:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @jsensharma , Thank you very much. after following your steps of adding the debug in log4j properites file and restarting the ambari server . The alerts logs are now being generated. Really appreciate your input..
Thanks to the Community!!.. you guys rock!
