VMware ESX healthcheck

Posted by Duncan Epping in January 28th, 2008
Published in Management & Automation, Server

One of the most useful scripts for ESX in my opinion is health_check.sh. This scripts generates an html file which contains a enormous amount of useful info on how the ESX host was installed. Besides that it contains 30 lines of the most important log files and for instance if there are snapshots and much much more. I just tested the script on ESX 3.5 and it still works great. The script is created by two guys of the Danish VMUG one of them is A. Mikkelsen, check his blog for more scripts! Be sure to check out this script, it’s worth it! By the way, you can schedule it and have the html emailed to you via the use of smtp_send.pl.


22 user comments or pingbacks in this post

Follow-up this post comment rss or leave a trackback
1. A. Mikkelsen said,

Hi,
And thanks very much for the nice comment.
If anyone have feature requests to the script please let me know.

A. Mikkelsen

2. kastro said,

Yes, VERY useful script. I have tested it on ESX 3.0.x and also ESX 3.5 and is working great.
I did have problem setting it up in crontab. Have tried various settings but when I put it in crontab nothing happens. In crontab log it seams that script executed but no file is creater / mail send. Any ideas?

Thanx

3. Duncan Epping said,

that’s because the path to the config file is missing. edit the script and put the config path in there the hard way.

Great looking script. Would be nice to see if it could dump it to a csv. Have not looked to see if it can do that yet, but it would be very nice as I manage over 400 ESX servers right now. It would be nice it have it dump a csv on a scheduled basis. That way I could pull it up in a central report view.

5. Duncan Epping said,

Doesn’t support csv at the moment… But just request the feature on the forum of sourceforge and maybe, if these guys can find the time, they will hook you up.

Just put it in there!

Thanks!

7. Luis R. Alvarez said,

Just ran on two servers within our ESX farm. One running 3.5 and the other running 3.0.2. Both worked great! Going to work on getting it scheduled daily.

8. kastro said,

“Duncan Epping
January 28th, 2008 at 18:44

that’s because the path to the config file is missing. edit the script and put the config path in there the hard way.”

Yes, you are right. After hardcode .conf file the script runs perfectly in crontab.
The only problem is now that it dont send emails. Probably enviroment problem?

9. Duncan Epping said,

probably the same issue? hard coded path?

10. Grant Ballard said,

I am having no problem getting the html generated but the email part is not working…I get the following:

smartHost: smtp.intra.net
to: gballard@dcolighting.com
subject: ESX Healthcheck VM1.intra.net
attach: /var/log/esx_healthcheck_30-01-08.html
Failed to connect to mail server: Invalid argument
at /health/smtp_send.pl line 114

And line 114 in the smtp_send.pl is:

$msg->send;

Any ideas?

11. Duncan Epping said,

Did you open up port 25 on the ESX firewall?

12. Grant Ballard said,

According to esxcfg-firewall -q:

Opened ports:
smtp_out : port 25 tcp.out

Yes it appears that it is open.

13. kastro said,

“Duncan Epping
January 30th, 2008 at 20:11

probably the same issue? hard coded path?”

Correct, I had to hardcode path also for smtp_send.pl and now is working ;-)

Thank you for your help!

14. A. Mikkelsen said,

Regarding the script to generate csv files instead of html i will look into this asap, but my test enviroment has crached and i’m waiting for a new disk.
I hope to get it within days and then i look into it.
Hope you can wait :-)

15. A. Mikkelsen said,

Got my test enviroment up and running.
I looked a bit on how to generate a CSV file and i need some idears.
1. Do you want 2 colums (description, data)?
Or give me an idear to how you would like it to look.
You can email it to me at (am”’_@_ ”’ amikkelsen.com)
2. Do you want a header/title for each colum?

Any idears are welcome – any code are also apprecited

16. Jim Warren said,

Just another ‘attaboy’ for the script. I too hardcoded the paths for health_check.conf in the sh

. /usr/local/bin/health_check.conf

and

for smtp_send.pl in the conf

/usr/local/bin/smtp_send.pl

and it is working great as a cron job

thanks!!

17. jatdesi said,

Thanks for a very helpful post AND blog!

18. Anders Olsson said,

Hi. Looks great, but why is there no development on the SF project?

19. Daniel Larsson said,

Is there a ESXi compatible script?

//Daniel

20. Duncan Epping said,

Not yet, but the guys are working on it, they are probably going to leverage Powershell…

21. Daniel Larsson said,

It Would have been nice to use VMware’s RCLI appliance

Leave A Reply Below

Currently browsing VMware ESX healthcheck

 Username (*required)

 Email Address (*private)

 Website (*optional)

Pingback and trackback

Link trail from various blogs:
Pingback on December 30th, 2008 at 00:50

Topics Search

Yellow-Bricks recommends:







VMware Fusion and VMware Workstation: Support Yellow-Bricks and get a 10% discount on select VMware products.

Train Signal:
Learn Virtualization technology with Train Signal. Support us and learn how to fully utilize VMware products at the same time! Click here for more info!

Advertisements

Recent Comments

Tags

Info