opsview에서 장애 발생시 sms 발송을 어떻게 해야할까요?

prankenmk2의 이미지

안녕하세요.

기존 nagios를 통하여 모니터링을 하여 장애 발생시 sms로 연락 받을 수 있도록 하여
운영하고 있었습니다.

그런데 nagios가 파일기반으로 운영되다 보니 관리에 어려운 점이 많아 다른 모니터링툴을 찾아보다가 nagios 기반의 opsview를 설치하였습니다.

현재 여러가지 설정을 알아보고 있는데요.

nagios와 거의 비슷하여 큰 문제는 없어보이나 sms부분에서 막혀 적용을 못하고 있습니다.

기존 nagios에서는 sms 발송 스크립트를 만들어 commands.cfg 파일에 커맨드를 추가하여 사용하였습니다.

커맨드는 아래와 같습니다.

define command{
command_name notify-host-sms
command_line /usr/lib/nagios/plugins/smssend.sh $CONTACTPAGER$ "Host Alert:$HOSTNAME$($HOSTADDRESS$)
is $HOSTSTATE$ "
}

일단 opsview에 기존 sms 발송 스크립트를 복사하였는데 관리페이지에서 sms 발송 설정법에서 해매고 있는 중입니다.

advanced -> Notification Method 메뉴에서 sms 스크립트를 추가하였지만 sms 발송 스크립트로 전혀 정보를 전달을 하지 않습니다.

name : sms
active : 체크
command : smssend.sh (경로는 맞춰 놨습니다.)
Contact Variables : pager

로 설정하였습니다.

sms 부분과 기타 그룹부분만 알게되면 nagios에서 바로 변경할텐데..

조언 부탁드립니다.

감사합니다.

junilove의 이미지

http://kldp.org/node/107435 를 참조해보세요.
제가 사용했던 LG데이콤 SMS기준이지만, 참조하셔서 사용하시는 SMS업체에 맞게 작성하셔서 될것으로 보입니다.

prankenmk2의 이미지

답변 감사합니다.

올려주신 글을보고 제가 nagios를 무리없이 운영했습니다. ^^

그런데 opsview는.... 헤매게 되네요.

opsview에서도 그냥 nagios처럼 셋팅을 하면 되나요? (웹으로 해야 하는줄 알고 있었습니다.)

junilove의 이미지

저 같은 경우는 opsview로만 해봤습니다. 이상하게도 그냥 nagios는 잘 안되어서요. ^^
nagios에서 하셨던것처럼, cfg파일을 작성하신후에 opsview의 web에서 Notification Method 만 등록해주면 되는것으로 기억합니다. (현제 지금 opsview를 사용않하고 있어서 기억이 가물하네요.)
아래 링크가 문의하신 내용이니 참조하시면 되겠습니다.
http://docs.opsview.com/doku.php?id=opsview-community:notificationmethods#adding_a_new_notification_script

. Put your script into /usr/local/nagios/plugins/notifications on the Opsview master server, as the nagios user
. Create a new Notification Method (Advanced ⇒ Notification Methods). Set appropriate configuration (see above)
. Each contact will then have to select this notification method to one of their notification profiles
. Reload for Nagios to take effect
. Cause a failure to test that the notification is sent
prankenmk2의 이미지

감사합니다.!

알려주신 부분 덕분에 해결할 수 있었습니다.!!

junilove의 이미지

도움이 되었다니, 다행이네요. ^^

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.