nagios check service postgresql banner sub

Hướng dẫn cách sử dụng Nagios check service Postgresql trên server

Nagios check service Postgresql là gì?

Nagios check service Postgresql là việc sử dụng các thư viện có sẵn của NRPE plugin để kiểm tra trạng thái của service Postgresql có đang hoạt động hay không trên server. Trong bài viết này, mình sẽ hướng dẫn cách sử dụng Nagios để kiểm tra service của postgresql. Các bài viết sau, mình sẽ hướng dẫn cách sử dụng Nagios để kiểm tra các thông số hoạt động của server.

Trong bài viết trước, mình đã hướng dẫn cách thêm các linux host và service vào Nagios Monitoring Server, các bạn có thể tham khảo lại tại đây.

Hướng dẫn cách cài đặt.

1. Cài đặt trên các server cần kiểm tra service postgresql.

Chỉnh sữa file nrpe.cfg.

Tìm đến file usr/local/nagios/etc/nrpe.cfg

Bên dưới dòng # The following examples use hardcoded command arguments… 

Bạn thêm nội dung sau:

command[check_postgresql]=/usr/local/nagios/libexec/check_procs -c 1:1024 -a /usr/lib/postgresql/9.3/bin/postgres

Chú thích:

check_postgresql là tên mình sẽ gọi trên Nagios Monitoring Server
là một script để kiểm tra số lượng process đang hoạt động.
-c 1:1024 là một biến điều kiện, ở đây mình đặt là số lượng procress nằm ngoài khoảng từ 1 đến 1024 thì sẽ báo lỗi critical.
-a /usr/lib/postgresql/9.3/bin/postgres là một biến để kiểm tra, ở đây là kiểm tra process trên service postgresql, đường dẫn trên là trên server debian.

2. Cài đặt trên Nagios Monitoring Server.

Chỉnh sữa file service.cfg nằm trong usr/local/nagios/etc/service.cfg

Thêm vào nội dung sau:

define service {
use                     generic-service
host_name               codegiday
service_description     openerp-postgres1
check_command                 check_nrpe!check_postgresql
notifications_enabled          1

Restart service Nagios.

service nagios restart

Kiểm tra hoạt động.


Kết luận:

Mình vừa giới thiệu đến các bạn cách kiểm tra service của postgresql vào Nagios Monitoring Server. Các bạn có thắc mắc gì có thể để lại comment chia sẽ bên dưới. Nếu bài viết có nhiều sai sót xin các bạn góp ý
Cảm ơn các bạn theo dõi.

7 thoughts to “Hướng dẫn cách sử dụng Nagios check service Postgresql trên server”

  1. I was pretty pleased to uncover this web site. I wanted
    to thank you for ones time just for this wonderful read!!
    I definitely really liked every part of it and I
    have you saved as a favorite to check out new things on your site.

    May I simply just say what a relief to discover an individual
    who actually understands what they are discussing on the web.
    You actually realize how to bring an issue to light and make it important.
    More people have to look at this and understand this side of the story.
    I can’t believe you’re not more popular since you certainly possess the gift.

    Very good post. I certainly love this site. Keep it up!

    It’s difficult to find educated people in this particular topic, however, you sound like you know what you’re talking
    about! Thanks

    You ought to take part in a contest for one of the greatest blogs online.
    I’m going to recommend this website!

    An intriguing discussion is definitely worth comment. There’s no doubt that that you should publish more on this topic, it might not
    be a taboo matter but typically folks don’t talk about such topics.
    To the next! Kind regards!!

    Howdy! I just would like to offer you a big thumbs up for the great info you’ve got right here on this
    post. I am returning to your site for more soon.

    When I initially left a comment I seem to have clicked
    the -Notify me when new comments are added- checkbox and now each time a comment
    is added I receive 4 emails with the exact same comment.

    Perhaps there is a means you are able to remove me from that service?
    Many thanks!

    The very next time I read a blog, Hopefully it doesn’t fail me as much
    as this one. I mean, I know it was my choice to
    read, but I really believed you would have something useful to
    say. All I hear is a bunch of whining about something you could fix if you were not
    too busy seeking attention.

    Spot on with this write-up, I really believe that this amazing site needs a great deal more attention. I’ll probably be returning to read more, thanks for
    the advice!

    You are so interesting! I don’t think I’ve read a single thing like this before.
    So great to discover another person with a few original thoughts on this issue.

    Seriously.. thank you for starting this up. This site is something that is needed on the internet, someone with a
    little originality!

    I really like looking through an article that
    can make people think. Also, thank you for allowing me to comment!

    Right here is the right site for anyone who hopes to understand this topic.
    You know a whole lot its almost hard to argue with you (not that I personally will need to…HaHa).

    You definitely put a brand new spin on a topic that’s been written about for years.
    Wonderful stuff, just excellent!

    Aw, this was an exceptionally good post. Taking the
    time and actual effort to produce a good article… but what can I say… I put things
    off a lot and don’t manage to get anything done.

    I’m amazed, I must say. Seldom do I come across a blog that’s both educative and interesting, and without a doubt, you have hit the nail
    on the head. The problem is something which too few folks are speaking intelligently about.
    I’m very happy that I stumbled across this during my search for something relating to this.

    Oh my goodness! Awesome article dude! Many thanks, However I am going through issues with your RSS.
    I don’t understand why I am unable to subscribe to it. Is there anybody getting identical RSS problems?
    Anybody who knows the solution will you kindly respond?

    An impressive share! I’ve just forwarded this onto a friend who was doing a little
    homework on this. And he actually bought me dinner due to
    the fact that I stumbled upon it for him… lol. So let me reword this….
    Thanks for the meal!! But yeah, thanx for spending the time to discuss this topic
    here on your website.

    After looking over a handful of the blog articles on your website, I really appreciate your technique of blogging.
    I bookmarked it to my bookmark site list and will be checking back soon. Take a look at my website as well and
    let me know what you think.

    This web site definitely has all the info I needed about this subject
    and didn’t know who to ask.

    There’s definately a great deal to know about this issue.
    I like all of the points you’ve made.

    You made some decent points there. I checked
    on the web for more information about the issue and found most individuals will go along with your views on this

    Good post. I learn something new and challenging on websites I stumbleupon every day.
    It’s always useful to read articles from other authors and use something from their web sites.

    I blog often and I seriously thank you for your content.
    This great article has truly peaked my interest. I am going to take a note of your website and keep checking for new
    information about once a week. I subscribed to your Feed too.

    Pretty! This has been an incredibly wonderful post.
    Thanks for providing this information.

    Greetings! Very useful advice within this post! It’s the
    little changes that make the most important changes.
    Thanks for sharing!

    Hello there! This post couldn’t be written any better!
    Looking at this article reminds me of my previous roommate!
    He continually kept talking about this. I most certainly will forward this post to
    him. Fairly certain he’s going to have a great read. Thanks for sharing!

    Hello, I do think your web site may be having
    browser compatibility issues. Whenever I look at your site
    in Safari, it looks fine but when opening in IE, it’s got some overlapping issues.
    I simply wanted to give you a quick heads up! Besides that, excellent website!

    Having read this I believed it was rather enlightening.
    I appreciate you spending some time and energy to put this
    information together. I once again find myself spending way too
    much time both reading and commenting. But so what, it was
    still worthwhile!

    Good day! I could have sworn I’ve been to this blog
    before but after browsing through a few of the posts I realized it’s new to me.
    Anyhow, I’m definitely happy I found it and I’ll be book-marking it and checking back

    I want to to thank you for this wonderful read!! I certainly enjoyed every little bit of
    it. I have you saved as a favorite to check out new stuff you post…

    Hi, I do think this is an excellent site. I stumbledupon it 😉 I’m going to come back once again since i have saved as a favorite it.

    Money and freedom is the best way to change, may you be rich and continue to guide other people.

    Your style is very unique in comparison to other people I have read
    stuff from. Thank you for posting when you’ve got the opportunity, Guess I will just book mark this

    I was able to find good advice from your blog posts.

    Wonderful post! We are linking to this great content on our website.
    Keep up the good writing.

    This is a good tip particularly to those fresh to the blogosphere.
    Simple but very accurate info… Many thanks for sharing
    this one. A must read article!

    I could not refrain from commenting. Very well written!

    bookmarked!!, I love your web site!

    Good post. I’m facing many of these issues
    as well..

    Way cool! Some extremely valid points! I appreciate you penning this post
    and also the rest of the site is extremely good.

    Excellent blog you have got here.. It’s difficult to find quality writing like yours nowadays.
    I really appreciate people like you! Take care!!

    This is a topic which is near to my heart… Thank you!
    Where are your contact details though?

    I absolutely love your blog.. Pleasant colors & theme.
    Did you create this web site yourself? Please reply back as I’m hoping to
    create my own website and would love to learn where you got this
    from or what the theme is called. Thank you!

    Everyone loves it when individuals come together and share thoughts.
    Great website, keep it up!

    Very good information. Lucky me I discovered your site by chance (stumbleupon).
    I have saved as a favorite for later!

    This site was… how do you say it? Relevant!! Finally I have found something which helped me.

    Everything is very open with a precise description of the challenges.

    It was truly informative. Your website is very helpful. Many thanks for sharing!

    I have to thank you for the efforts you have put in penning this blog.

    I’m hoping to see the same high-grade content by you later on as well.
    In truth, your creative writing abilities has encouraged me to get my own, personal website now 😉

    Feel free to surf to my website :: หวยไทย

  2. Excellent website you have here but I was wanting to know if
    you knew of any user discussion forums that cover the same topics talked about here?
    I’d really like to be a part of group where I can get feed-back from other knowledgeable people
    that share the same interest. If you have any recommendations, please let me know.
    Thanks a lot!

  3. First of all I want to say wonderful blog! I had a quick question that I’d
    like to ask if you don’t mind. I was interested to find out how you center yourself
    and clear your mind before writing. I’ve had a hard time clearing my
    mind in getting my ideas out. I do take pleasure in writing however it just seems like the first 10 to 15 minutes
    are usually wasted just trying to figure out how to begin. Any recommendations or hints?

  4. Hello! I know this is kind of off topic but I was wondering which blog
    platform are you using for this website? I’m getting fed up of
    Wordpress because I’ve had issues with hackers and I’m looking at options for another platform.
    I would be fantastic if you could point me in the direction of a good platform.

Comments are closed.