dwilk1973
2 Iron

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!

0 Kudos
9 Replies
ionthegeek
4 Ruthenium

Re: Check avamar services or processes at command line

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.

0 Kudos
dwilk1973
2 Iron

Re: Check avamar services or processes at command line

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.

dwilk1973
2 Iron

Re: Check avamar services or processes at command line

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?

0 Kudos
Highlighted
ionthegeek
4 Ruthenium

Re: Check avamar services or processes at command line

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:Smiley FrustratedMTP 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.

dwilk1973
2 Iron

Re: Check avamar services or processes at command line

Thanks Ian! I will run with this information.

0 Kudos
ionthegeek
4 Ruthenium

Re: Check avamar services or processes at command line

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

0 Kudos
Amol3
2 Iron

Re: Check avamar services or processes at command line

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

ionthegeek
4 Ruthenium

Re: Check avamar services or processes at command line

I learned something new today. Thanks Amol Powar!

0 Kudos
dwilk1973
2 Iron

Re: Check avamar services or processes at command line

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.