Articles I've written for customers on IT issues.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
5.1 KiB

5 years ago
  1. \documentclass[11pt]{article}
  2. %Gummi|065|=)
  3. \usepackage{graphicx}
  4. \usepackage{caption}
  5. \title{\textbf{HP Server Monitoring Software}}
  6. \author{}
  7. \date{}
  8. \begin{document}
  9. \maketitle
  10. \tableofcontents
  11. \section{Overview}
  12. There are different programs to monitor servers. Dell has Dell Open Mangaer Server Administrator. Fairly easy to install and run. HP has Systems Insight Manager. It's in the HP Enterprise section. When you install HP's program you also have to successfully install a service that will pull data from your server, this program is called the WBEM provider, or there is another one (similar function) of another protocol (SNMP).
  13. \section{Details}
  14. I am used to Dell, but started on these HPs. Had one that was able to show the web console of Systems Insight Manager, and the HP System Mangement Homepage (this is the one we want. SIM is for multiple computers), but it was blank. Couldn't read the server, and no data provider... Pretty much the solution is: if you try to install WBEM providers, and it doesn't work, try a different versioned install. Another might work. This is the IT world. \footnote{Don't give yourself a pat on the back for learning this. Just be aware of the ineptitude of software and IT trades.}
  15. \subsection{Email Notifications}
  16. After this, you'll want emails if a HDD fails.
  17. \\
  18. \\
  19. https://support.hpe.com/hpsc/doc/public/display?docId=emr\_na-c01146236
  20. \\
  21. \\
  22. but I'll download the page to resources.
  23. \\
  24. \\
  25. Note: requires anonymous SMTP relay, i.e. open smtp relay. Another quality software product /sarcasm. So while HP SIM will tell you what is going on, the email doesn't work. I should look into setting up a local smtp relay, but not on windows... Instead let's try other software.
  26. \\
  27. \\
  28. https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX\_4effd70562304a50b3be5c4b96
  29. \\
  30. \\
  31. HP Proliant array configuration utility.
  32. This program is simpler, and better if you only want to monitor HDD health. TODO: enable cli reporting and email sending. Unfortunately the program files location c: program files compaq (wut) something bin folder doesn't have any hpaucli which linux has. Shame.
  33. EDIT: looks like you need a separate download. So look for the HP offline array configuration utility.
  34. EDIT: Nope, nvm. that is a live CD, and ISO...
  35. Correct search term is HP array configuration utility cli.
  36. It ends up in:
  37. \begin{verbatim}
  38. C:\ProgramData\Microsoft\Windows\Start Menu\Programs\HP System Tools\HP Array Configuration Utility CLI (64-bit)
  39. which is a link to
  40. "C:\Program Files\Compaq\Hpacucli\Bin\hpacucli.exe"
  41. \end{verbatim}
  42. It's an interactive console. Though if you pass it arguments it runs without interactive mode.
  43. Success. \footnote{thankfully the commands between OS are the same. https://sysadm.mielnet.pl/generate-adu-report-with-hpacucli-debian-jessie/} Now to run a report. hpacucli.exe ctrl all diag file=report.zip
  44. which works. Last step is to automate sending this via an email, which I have handled with powershell before.
  45. \subsection{Email Details}
  46. The command you want to output to a file is the following:
  47. \begin{verbatim}
  48. hpacucli.exe ctrl all show config > C:\file.txt
  49. \end{verbatim}
  50. The email prototype is the following: (from https://philerb.com/2011/11/sending-mail-with-powershell/)\footnote{the ctrl all diag file= command originally posted is interesting, but far too verbose, for simple hdd checking. It's quite thorough on SMART though. Take a look at it. It's a zip by default.}
  51. \begin{verbatim}
  52. $emailSmtpServer = "mail.somewhere.com"
  53. $emailSmtpServerPort = "587"
  54. $emailSmtpUser = "username"
  55. $emailSmtpPass = "password"
  56. $emailMessage = New-Object System.Net.Mail.MailMessage
  57. $emailMessage.From = "John Smith <john@somewhere.com>"
  58. $emailMessage.To.Add( "jane@somewhere.com" )
  59. $emailMessage.Subject = "Testing e-mail"
  60. $emailMessage.IsBodyHtml = $true
  61. $emailMessage.Body = @"
  62. <p>Here is a message that is <strong>HTML formatted</strong>.</p>
  63. <p>From your friendly neighborhood IT guy</p>
  64. "@
  65. $SMTPClient = New-Object System.Net.Mail.SmtpClient( $emailSmtpServer , $emailSmtpServerPort )
  66. $SMTPClient.EnableSsl = $true
  67. $SMTPClient.Credentials = New-Object System.Net.NetworkCredential( $emailSmtpUser , $emailSmtpPass );
  68. $attachment = "C:\myfile.txt"
  69. $emailMessage.Attachments.Add( $attachment )
  70. $SMTPClient.Send( $emailMessage )
  71. \end{verbatim}
  72. Also put the command for hpacucil.exe in a .bat or .cmd script so that it can be run via task scheduler.
  73. C:Program FilesHpaculcil ctrl all show config > file
  74. Note that you have to put Program Files in quotes, or escape the space. You may also need another .bat script for the powershell code above. Save that email code as .ps1, set execution policy to remote signed, and then just run powershell ./script.ps1 in the .bat.
  75. That should do it. Make sure in powershell to use ./ before file, while in bash it's just filename, or full path. Or set task scheduler to execute in the directory that is where the .ps1 is. What a mess.\footnote{Funny thing is: in bash you write full paths as C: backslash directory while in powershell it's C: forwardslash directory.}
  76. \subsection{Pale Moon Portable / Binary}
  77. I used a pale moon binary on this server. Didn't want to install it for all users. IE doesn't always work.
  78. \end{document}