LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > SNMP Agent...

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2006, 03:37 PM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
Default SNMP Agent...

I keep getting the error message below when i try and snmpwalk:

SNMPv2-SMI::enterprises.8888.101 = No Such Instance currently exists at this OID

When i use V1 i get no message at all. I know my config is ok b/c i can access anything else:

snmpwalk -c hhpv2 -v 2c localhost .1.3.6.1.4.1

Returns a whole bunch of info. All i added to my config was the line:

pass .1.3.6.1.4.1.8888 /etc/snmp/litespeed/sample.php

and i replaced the first 2 lines of sample.php to the following:

#!/usr/local/bin/php
<?php

Since my php does not use short tags, am i missing something here? Is there a way for me to test it via the command line and no SNMP?
Reply With Quote
  #2  
Old 07-27-2006, 04:58 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
Test:

Code:
/usr/bin/php /etc/snmp/litespeed/sample.php
.1.3.6.1.4.1.8888.101.1
string
LiteSpeed Web Server
Excecute the sample.php with no args should give you the litespeed product name and let you know the script is working. Note you need PHP 5.

Another problem would be your snmpd.conf

Use only the following 2 lines for your snmpd.conf and restart snmpd.

Code:
rocommunity  public
pass .1.3.6.1.4.1.8888 /usr/bin/php /etc/snmp/litespeed/sample.php
If above snmpd.conf works then there is some conflict or misconfig in existing snmpd.conf.
Reply With Quote
  #3  
Old 07-28-2006, 07:51 AM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
I tried just running the script and i get no output, are there settings in php.ini that need to be changed?

PHP 5.1.2 (cli) (built: Feb 28 2006 12:12:16)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

/usr/local/bin/php sample.php

Produces no output for me
Reply With Quote
  #4  
Old 07-30-2006, 12:53 PM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
Am i the only one using this feature? Well trying anyway...
Reply With Quote
  #5  
Old 07-30-2006, 01:25 PM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
I'm using it and without problems .
running the script manually gives no output for me too, that can't be the cause of your error.
Reply With Quote
  #6  
Old 07-31-2006, 07:40 AM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
I am starting to think that there is an issue with my php.ini, i am just really sure where to start...

Am i supposed to disable safemode?
Reply With Quote
  #7  
Old 07-31-2006, 01:40 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
The php that executes the litespeed snmp bridge sample script, i.e. sample.php, must have read access to the /tmp/lshttpd/ folder. Perhaps safemode is responsible for your problems, but then again maybe now.

I made an error saying that executing the sample.php script without input parameters would output a value. I was using a customize version.

For the default sample.php, execute this command:

Code:
php sample.php '-g' .1.3.6.1.4.1.8888.101.1
and you should get the following output:

Code:
.1.3.6.1.4.1.8888.101.1
string
LiteSpeed Web Server
if you don't get the above output, there is someting wrong with your php and/or php.ini.

Last edited by xing; 07-31-2006 at 01:44 PM..
Reply With Quote
  #8  
Old 07-31-2006, 02:50 PM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
Warning: file_get_contents(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /tmp/lshttpd/.rtreport owned by uid 99 in /etc/snmp/litespeed/class.litespeed_stats.php on line 87

Warning: file_get_contents(/tmp/lshttpd/.rtreport): failed to open stream: Success in /etc/snmp/litespeed/class.litespeed_stats.php on line 87
.1.3.6.1.4.1.8888.101.1
string


Looks like safe mode is the issue...

I'll change it in a bit and get back to you
Reply With Quote
  #9  
Old 07-31-2006, 02:59 PM
hugemikeyd hugemikeyd is offline
Member
 
Join Date: Mar 2006
Location: New York
Posts: 42
php -d safe_mode=Off sample.php '-g' .1.3.6.1.4.1.8888.101.1

.1.3.6.1.4.1.8888.101.1
string
LiteSpeed Web Server

Looks like you should mention that safe mode must be turned Off or that the .rtreport file should be owned by the same user executing the script.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
snmp OID question PSS PHP 3 06-18-2007 06:32 PM
No SNMP data (Cacti) Stefan Soellner Install/Configuration 1 11-13-2006 03:34 AM


All times are GMT -7. The time now is 05:31 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.