'@' Allowed in the community name?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
michelem
Posts: 34
Joined: Thu Mar 30, 2006 7:34 am

'@' Allowed in the community name?

Post by michelem »

Do you know if a community name like "user@example-1d" (notice the "@") is allowed in cacti?
An snmpwalk works fine but when I add the device in cacti I get "snmp error".
Thanks
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I have not had problems in the past.

Do me a favor, go the about page (click the cactus) and tell me what the text at the bottom under "Cacti Variables" says.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
michelem
Posts: 34
Joined: Thu Mar 30, 2006 7:34 am

Post by michelem »

Cacti Variables
Operating System: unix
PHP SNMP Support: no

thx
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

May sound crazy, but put a "\" infront of the "@". Because you don't have php snmp support and I assume you are using cmd.php as you poller, the Cacti snmp functions are calling the NET-SNMP utlities. The shell is probably causing some issues with special characters.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
michelem
Posts: 34
Joined: Thu Mar 30, 2006 7:34 am

Post by michelem »

No OK It works.
I tried with an other host with a @ included in the community and it works, so there are some problem on that host, i'll analize it.

Thank you and sorry.
michelem
Posts: 34
Joined: Thu Mar 30, 2006 7:34 am

Post by michelem »

The problem was that the host hadnt the System OID setup, so about this row in host.php:

[...]
$snmp_system = cacti_snmp_get($host["hostname"], $host["snmp_community"], ".1.3.6.1.2.1.1.1.0", $host["snmp_version"], $host["snmp_username"], $host["snmp_password"], $host["snmp_port"], $host["snmp_timeout"], read_config_option("snmp_retries"),SNMP_WEBUI);

if ($snmp_system == "") {
print "<span style='color: #ff0000; font-weight: bold;'>SNMP error</span>\n";
}else{
[...]

it returned "SNMP error" beacuse the host didnt reply to the OID ".1.3.6.1.2.1.1.1.0" (System descriptor)
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yep, that would be an error.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests