logo_centreon_print_300dpi

ERROR No response from remote host (Nagios / Centreon / Ubuntu)

Are you a mostly Windows admin and using your mediocre Linux skills to setup a Nagios 3.x server running on Ubuntu 10.04 using the Centreon 2.3.x UI for configuration?

You’ve got the monitoring server all set up and it works monitoring localhost, but you get these errors when you try to setup Nagios monitoring for a Windows server?

"ERROR: No response from remote host 'x.x.x.x'."
"ERROR when getting SNMP version : No response from remote host 'x.x.x.x'."

Now you’ve spent WAY too many hours Googling a solution, none of which solve your issue?

Possible solution here:

Make sure you have SNMP installed and configured on your client Windows machines. I know. Stupid that you missed this, right? Many, many moons ago, when I worked for a company that implemented Nagios for every client we serviced, I recall doing nothing more than installing the nsclient++ and dropping in our preconfigured INI file. I don’t ever remember needing to install SNMP though my memory gets worse every year I work in technology. Maybe we did, I just don’t remember. So long as SNMP is configured for Nagios to communicate properly and Centreon is setup right, you don’t even need the nsclient++ for basic monitoring.

I used an XP virtual machine to show these steps, though the same configuration works for Windows 2003 monitoring setup. Windows 2008 I haven’t tried setting up. The monitoring server is 192.168.1.115.

EDIT: Have gotten a few comments that setting up SNMP on a Windows 2008 box works as well. Thanks Alan and Theo.


1

2

3
Set community name and trap destination
4
Set authentication trap
5

Restart the services and Nagios should start communicating with your server. This post is the result of more days Googling for a solution to this than I even care to share with you. Well, that and the fact that the solution was so glaringly simple that everyone else on the Internet probably already knows what the solution was and thought it too obvious to share with the world.

Let me know if this fixed your problem since I’m under the illusion that I am the only one who reads my blog.

-Brian

28 thoughts on “ERROR No response from remote host (Nagios / Centreon / Ubuntu)”

  1. You didn’t test windows 2008, but I can conform it works like a charm.

    Using centreon and this webpage, services are now monitored 🙂

    Thanks!

    1. Oh, great. I guess I’m not the only one who reads my blog now. Rats! 😉 Glad it worked Theo.

      (Hmm… guess I get to delete one spam response now. w00T!)

  2. OMG! I’ve been bumping into this for 2 days now….Finally, got to your blog. Thanks a lot!

    I just assumed NSClient would have it’s own snmp service embedded and not rely on Windows’. In Centreon docs there’s checklist to get things working with Windows servers but no hint about this. I suppose I should’ve read more about NSClient.

    Again, thanks for sharing!

    1. Yeah… ya know, I didn’t dive too heavy into the docs. I just based my effort on previous versions of the NS client and a straight Nagios server (less Centreon). Configuring SNMP and equally as many days of trial-and-error seemed to do the trick. I just *know* there’s another way to get the NSClient working without needing Windows-native SNMP, but I stopped screwing around with it as soon as this started working.

      Glad it worked for you Edu.

    1. No worries, Andrew. It’s one of those dumb little things I (and plenty of others) tend to overlook. Glad you’re working now. 🙂

  3. I was assuming (incorrectly) that nsclient++ worked without the SNMP service running and setup correctly. I Googled for about a day before I found your blog. Thank you.

    1. Nope Jeff, that wasn’t necessarily an incorrect assumption. Willing to be wrong here, but I recall the nsclient++ used to work without SNMP. Perhaps it was only on W2000 servers or release versions of W2K3, but it didwork at one point. Glad you found me and that it worked for you.

  4. Brian,

    Stumbled across your site troubleshooting this very problem. I have set up nagios and snmp etc correctly. I’ve narrowed the problem down to IPTables rules. When they are enabled, i get the error we all know and love:

    [root@nagiossvr libexec]# ./check_openmanage -H somehost -C mycomm
    SNMP CRITICAL: No response from remote host ‘somehost’

    However if i stop the iptables service i get the following response.

    [root@nagiossvr libexec]# ./check_openmanage -H somehost -C mycomm
    Cache Battery 0 in controller 0 is Failed

    Which looks like a legitimate response. Would you be able to shed any light on what
    iptables rule i should have to allow this through?

    KA

    1. With the qualification that I’m truly, truly not qualified to debug much (if anything) on a Linux box without a bucket full of random tutorials culled from the Internet, what about this… Seems to me if you created the correct rules in IPTABLES for SNMP to travel through, the monitoring should work. Try adding rules for both UDP and TCP, in both directions, for ports 161 and 162. (You’ll have to find another place for the appropriate IPTABLES command line).

      Let me know how it goes. Would like to know what ultimately solved it for you Kev.

      1. Brian,

        Well you suggestion appears to have worked. With Iptables running i can get a response from a box on my nagios box. I would never have thought to try putting in rules for the outbound chain. There were no rules as it stood so why add any.

        Thanks again and hopefully this will be all i need to worry about.

        K

      2. And false rejoicing… Seems to have only worked that one time for some odd reason. Back to the drawing board. Thanks for your help though.

        K

      3. And an epiphany at the final hour. This seems to have worked, though dont be surprised if im back tomorrow telling you i goofed. I was sitting here, watching “Snow White and the Huntsman” incidentally, and it occurred to me that my iptables rules were backwards.

        8 ACCEPT tcp — anywhere anywhere tcp dpt:snmp
        9 ACCEPT udp — anywhere anywhere udp dpt:snmp

        These rules accept any incomming traffic where the source port is 161.

        iptables -I INPUT 8 -p tcp -m tcp –sport 161 -j ACCEPT
        iptables -I INPUT 8 -p udp -m udp –sport 161 -j ACCEPT

        Well it makes sense at 10:24pm. Hopefully it will be the same tomorrow morning. I am by no means an iptables expert. This is based off of a day of experimentation, googling and hair pulling.

        K

        1. Yeah… you’re probably on the right track. I mean, monitoring works with filters down so there has to be something about the filters.

          BTW… did you get external email working? I don’t muck with Nagios core much and prefer the GUI of Centreon (time saver), but can’t remember how the hell I set up outbound email before. Whatever. Low priority.

          1. Well the checks are still working so that seems to have done the trick.

            External email? From the nagios box? We route our external mail through our mail system. I havent had a problem with that. The powers that be sprung for the Nagios XI version so we have a more polished GUI. Plus everything comes as a virtual machine image so getting Nagios set up initiall is a breeze.

            K

  5. This really helped me out, thank you! I didn’t have the security tab on the snmp service configured to allow the nagios server. However, Im getting a different error now. I was getting, this error before configuring that setting,
    SNMP TABLE ERROR : No response from remote host 172.16.41.6
    And after configuring the snmp service correctly, this is the error I get,
    SNMP REQUEST ERROR : Received noSuchName(2) error-status at error-index 1. Cases: 1) SNMP not working. 2) specify the disk name when option -n is used. 3) Disk not exist. 4) Delete cache file /tmp/remote_storage_cache_172.16.41.6 (maybe corrupted)

    This is my first time setting my FAN, so I am a noob to Nagios, any help would be appreciated because Im not finding any info on google about this yet.

    1. Hard to know what the issue is Steve. Nagios and Centreon, in fact just about everything about SNMP and server management, are complex technical arenas. I’m not much of an expert myself — more of an opportunistic hack.

      If you read your error message it suggests killing the file you have located here: “/tmp/remote_storage_cache_172.16.41.6”. I would start there.

  6. Thank you!!!
    After two days of searching, installing nslog and NSClient ++ I found your blog!
    Somehow, I see Services of ‘Windows_Disk_Size’, but the rest (Windows_Services_Status, Windows_Memory_Usage, Windows_CPU_Utilization) still stuck on the status ‘UNKNOWN’
    If you have any information that could help – it will really help me!

Leave a Reply

Your email address will not be published. Required fields are marked *