Announcement

Collapse
No announcement yet.

please assist SNMP config problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • please assist SNMP config problem

    I have a brand new installation of Oreon/Nagios on Debian and I'm trying to configure it all so it's working properly before I begin adding servers.

    I'm having an issue with SNMP being recognized in the General Options -> SNMP area.

    I installed SNMP using:
    apt-get install snmpd

    and it appears to be working properly, but Oreon is saying it is unable to write to the conf file (/etc/snmp/snmptrapd.conf) giving me a red "impossible to validate, one or more fields is incorrect" error message.

    Help?

  • #2
    give /etc/snmp write right to apache

    chmod 775 /etc/snmp
    chown root:apache /etc/snmp
    Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
    Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
    Fedora Core 5 - 2.6.20-1.2320

    Comment


    • #3
      when I attempt to do that I'm receiving the following:

      chown: 'root:apache' invalid group

      attached please find an export of my /etc/group file
      any help would be appreciated
      Attached Files

      Comment


      • #4
        just in case you want to take a look, here is my /etc/passwd file as well
        Attached Files

        Comment


        • #5
          help

          Comment


          • #6
            just replace apache by www-data in command line
            Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
            Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
            Fedora Core 5 - 2.6.20-1.2320

            Comment


            • #7
              I tried this and it went through fine, but the problem is still not fixed. It still says it can't write to the file.

              I did it for a bunch of the groups...www-data, nagios, etc.
              I tried every one that I thought could be a possibility. None of them allowed the interface to write to it.

              Either that, or the error I am getting is misleading and it's not a rights issue

              Comment


              • #8
                chmod 777 but it's a noob trick
                Intel(R) Xeon(TM) CPU 3.4GHz - MemTotal : 1034476 kB
                Centreon 2.4.1 - Nagios 3.2.1 - Nagios Plugins 1.4.15 - Manubulon Plugins tuné
                Fedora Core 5 - 2.6.20-1.2320

                Comment


                • #9
                  I'll state the (to those experienced with UNIX permissions fun) obvious as well:
                  Make sure /etc/snmp/ has rights, but also make sure /etc/snmp/snmptrapd.conf has rights.
                  Actually you probably don't even need to give rights to /etc/snmp, but in practice its a good thing to do, just in case snmptrapd.conf goes missing and Oreon wants to create it. So:

                  chown root.www-data /etc/snmp
                  chown root.www-data /etc/snmptrapd.conf
                  [CORRECTION: /etc/snmp/snmptrapd.conf]
                  chmod ug+rwx /etc/snmp
                  chmod ug+rw /etc/snmptrapd.conf
                  [CORRECTION: /etc/snmp/snmptrapd.conf]

                  (excuse me for my gross use of modern chmod options, but I find people can often understand it easier than 775 and 665 etc. Plus I always forget what the numbers mean :wink

                  See how that goes, if you are still having trouble after that, its almost certainly not a permissions issue (unless you are doing weird things with your apache - as long as apache is being run from the original debian package though, at that point I think we're looking for another issue)

                  Cheers,
                  Dan.
                  Production: Nagios 2.5,Oreon 1.3.1,Perfparse 0.106.1
                  Testing: Whatever I set up this week :wink:
                  EVERYONE: irc.freenode.net channel #oreon!!! :-)

                  Comment


                  • #10
                    chown -R www-data /etc/snmp

                    Don't forget the -R

                    Comment


                    • #11
                      Actually I left that out deliberately, hence the specific chown/chmod for /etc/snmp/snmptrapd.conf (note: I made an error it should have been /etc/snmp/snmptrapd.conf NOT /etc/snmptrapd.conf, I'll go back and edit it if I can)

                      Anyway, yes if you aren't too concerned about being specific with your queries, you could exchange my above commands for:

                      chown -Rc root.www-data /etc/snmp/
                      chmod -Rc ug+rwX /etc/snmp/

                      Note the capital 'X' - it will ensure you dont end up with every file in the directory as executable. Also I like to specify '-Rc' instead of '-R', that way you know exactly what was changed.

                      Ok, I'm submitting this before it turns into a full-on Linux sysadmin lecture. Hehehe.
                      Production: Nagios 2.5,Oreon 1.3.1,Perfparse 0.106.1
                      Testing: Whatever I set up this week :wink:
                      EVERYONE: irc.freenode.net channel #oreon!!! :-)

                      Comment


                      • #12
                        Originally posted by Daniel.Sloan
                        <snip>I'll state the (to those experienced with UNIX permissions fun) obvious as well:
                        Make sure /etc/snmp/ has rights, but also make sure /etc/snmp/snmptrapd.conf has rights.</snip>
                        Thanks for helping out a Windows guy on a crazy UNIX problem Daniel. This solved the issue right away with only a couple of seconds of config!

                        I may not completely understand your chowns, chmods, and ug+rwx 's but at least the damn thing works now :wink:

                        Thanks a bunch man

                        Also, do you (or anyone else) have any good reference links where I can read about permission settings in linux? I obviously don't fully understand them and it would probably help if I could read up on it a bit. If not, it's cool. Thanks for solving my problem

                        Comment


                        • #13
                          You need a book (easy way) to learn that and a lot of other stuff, like basic scripting (it will help you alot).

                          I got "UNIX made easy" 3rd edition by John Muster. It's 3 years old, but nice enough. chown, chmod, sed and bash don't change every day you know

                          Comment

                          Working...
                          X