snmp ping problem.. !!!

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
pfft
Posts: 10
Joined: Mon Dec 06, 2004 6:14 am

snmp ping problem.. !!!

Post by pfft »

hello,
i got one problem with my cacti setup :

i have 2 script commands that searches through a file for data with input from hostname field of the Device thingie.

the problem is i get errors from snmp stuff coz it is using the hostname to check the host.
and the hostname is in the Client23 format not numeric ip or fqdn hostname..

so i get these in cactid.log :

12/06/2004 01:08:05 PM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cactid
12/06/2004 01:08:05 PM - CACTID: Poller[0] ERROR: Problem initializing SNMP session 'Client23'
12/06/2004 01:08:05 PM - CACTID: Poller[0] WARNING: Unknown host Client23
12/06/2004 01:08:05 PM - PHPSVR: Poller[0] ERROR: Input Expected, Script Server Terminating

so how do i disable this host availability check so i can use my two scripts and another two ping loss and rtt scripts in the same time?
because if i put in the hostname the ip of the Client23 everything workd fine except the first two script command stuff that requires "Client23" instead of the numeric ip or hostname.

for a workaround how can i use the Description fields to feed the script commands ?
in Data Input Methods cani use instead of "hostname" at Special Type Code something like "description" to get the Description instead of Hostname of a Device?

thx.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Define a Host file entry for client23 and you should be all set.

/etc/hosts

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
pfft
Posts: 10
Joined: Mon Dec 06, 2004 6:14 am

Post by pfft »

TheWitness wrote:Define a Host file entry for client23 and you should be all set.

/etc/hosts

TheWitness
no,i dont want to do this, i have lots of clients and i dont want to use /etc/hosts.

thats why i asked if there is any way to use the Description field instead of the Hostname field to feed a script command
or
where do i hack the util.c or snmp.c not to check the availability of the host via no ping or snmp query.

thx for your first reply, but i need a better workaround..
:evil:
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

If the community string is blank, the device will not be polled for availability.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
pfft
Posts: 10
Joined: Mon Dec 06, 2004 6:14 am

Post by pfft »

TheWitness wrote:If the community string is blank, the device will not be polled for availability.

TheWitness
tried that..

wether i set the community string to blank or not, cactid still checks what i inserted at Hostname field (New Graph page) ....
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Edit your device and post a jpeg of the screen at that moment.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
pfft
Posts: 10
Joined: Mon Dec 06, 2004 6:14 am

Post by pfft »

TheWitness wrote:Edit your device and post a jpeg of the screen at that moment.
here is the screenshot. so you see what Hostname it is.
the default snmp or ping check cant find that to check only if i modify named and /etc/hosts
i want to stop the availability check and let me graph whatever i want based on that name.

can you like hack snmp.c or util.c of cactid and put somewhere a variable USE_CHECK to be set either 0 or 1 to not check or to check the hosts before doing graphs on them..

thx.
Attachments
Screenshot.png
Screenshot.png (71.73 KiB) Viewed 2809 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Cacti 0.8.7 will include the ability to have host specific checks including "nocheck". My suggestion would be to just hang-on until we get the 0.8.7 stuff rolled out. Therefore, simply use the host file for now. I don't want to:

1) Rush 0.8.7
2) Hack Code

However, if you did want to "hack" the Cactid code, I would do it in poller.c. If you want to do some advance testing in 0.8.7, it would be good to have a new member of the beta team.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
pfft
Posts: 10
Joined: Mon Dec 06, 2004 6:14 am

Post by pfft »

TheWitness wrote:Cacti 0.8.7 will include the ability to have host specific checks including "nocheck". My suggestion would be to just hang-on until we get the 0.8.7 stuff rolled out. Therefore, simply use the host file for now. I don't want to:

1) Rush 0.8.7
2) Hack Code

However, if you did want to "hack" the Cactid code, I would do it in poller.c. If you want to do some advance testing in 0.8.7, it would be good to have a new member of the beta team.

TheWitness
well, look what cactid.log says :

12/08/2004 03:04:04 PM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cactid
12/08/2004 03:04:04 PM - CACTID: Poller[0] ERROR: Problem initializing SNMP session 'Netland'
12/08/2004 03:04:04 PM - CACTID: Poller[0] WARNING: Unknown host Netland
12/08/2004 03:04:04 PM - PHPSVR: Poller[0] ERROR: Input Expected, Script Server Terminating

i dont want to put Netland in /etc/hosts or named, i have too many clients to graph to choose this as a workaround.
i just need cactid NOT to check the host getting Netland from Hostname field on the New Graph section.
where do i modify to not start the SNMP session routine nor trying to resolve the hostname ?

THX.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Do you want to disable the check for ALL servers?
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest