Start a Conversation

Unsolved

This post is more than 5 years old

D

16692

May 20th, 2014 19:00

Check avamar services or processes at command line

Hello, I want to monitor Gsan, MCS, EMS, and Scheduler with zenoss.  It can check services running on a linux box with basic PS commands and such.  Is there anyway to list these commands in Avamar?   Running a ps -ef in an SSH session I didn't see anything that looked like the gsan service or the other ones.  I could have overlooked them but not sure.

Thanks!

2K Posts

May 20th, 2014 19:00

Keeping in mind that installing agents onto Avamar nodes is NOT supported and has been known to cause problems in the past, the following are the Avamar processes running on the system:

  • gsan (storage nodes / single node servers only)
  • ascd (utility node only)
  • java that references mcserver.jar (utility node only)
  • java that references emserver.jar (utility node only)

The scheduler is part of the MCS and can't be monitored using ps.

Of course using ps doesn't tell you if those processes are in good shape, only whether or not they are running. If possible, using "dpnctl status" is much more informative. It has an XML mode (dpnctl status --xml) if that helps.

63 Posts

May 20th, 2014 20:00

So I can send commands to a file in Avamar.  I know I can setup postfix in a regular linux box and configure sending mail from the command line.  Is there a special way to do this with avamar?  Or do you know a better way to do it with avamar?  Say I write the dpnctl status command to an xml file in a directory.  I want to email that to our monitoring software to parse. 

Any thoughts?  I just don't want to go setting up mail on the utility node.  Obviously the grid can email reports and such so how can I leverage that functionality form the command line?

63 Posts

May 20th, 2014 20:00

Ian, Thanks for the reply.  You have helped me more than you know after reading a lot of your posts.....

Yes that does help.  I was not going to install any agents in the OS.  The monitor can SSH into Avamar and then see if a service is up or down using some PS commands.  The issue I had was in our proof of concept lab so it was not a big deal.  We lost power and the grid came back up with basic ping type check.  The problem was gsan was down because it came down hard.  Backups didn't run that night and then DPA didn't report backups failed because it simply couldn't contact the DB. So if this was one of our production grids it would have been a nightmare.  

I think the monitor software can parse an .XML file so I think that is the way to go.

2K Posts

May 21st, 2014 05:00

As far as I know the Avamar install doesn't include an e-mail client. Anything Avamar sends out by mail is sent directly to the SMTP server configured in mcserver.xml. The Ruby Net::SMTP module is available and I'd imagine there is a Perl module with similar functionality. If you Google for Perl SMTP or Ruby SMTP you should be able to find a decent tutorial on how to send outgoing mail from a script.

You can collect the dpnctl output using backticks (``), then encode it and send it out to the SMTP server.

2K Posts

May 21st, 2014 06:00

My pleasure! If you run into trouble, please don't hesitate to post here and I'll do what I can to help.

63 Posts

May 21st, 2014 06:00

Thanks Ian! I will run with this information.

207 Posts

May 21st, 2014 09:00

You could save the output of the commands to a file and then using the following command send an email.You could also setup as a cronjob for sending email on regular basis

In the following example I created a dummy file with the dummy output and send it to my email address.

root@trnave23:~/#: echo "All Services are running" >/tmp/output.log

root@trnave23:~/#: cat /tmp/output.log

All Services are running

root@trnave23:~/#: echo "Subject: ServiceStatus" | cat - /tmp/output.log | /usr/sbin/sendmail -F  "From@domain" -t "to@domain"

mail.png

2K Posts

May 21st, 2014 09:00

I learned something new today. Thanks Amol Powar !

63 Posts

May 21st, 2014 10:00

Thanks you guys.  I did find another way to do it.  I had to configure the file, ~/.mailrc and add some smtp information.

set smtp=smtp://smtp.mymailserver.com

set from="avamar@mydomain.com"

Once these two were added I can now send. I will just have to create a script that will do this and figure out how to run it on a schedule. 

No Events found!

Top