Some way to add and modify multiple OID's...
Moderators: Developers, Moderators
Some way to add and modify multiple OID's...
Ok, this is what I need to do. A device I am monitoring creates an OID everytime a user has a VPN connection to it.
for example...
OID Value
.1.3.......1.1.1 0
.1.3.......1.1.2 1
.1.3.......1.1.3 2
.1.3.......1.1.4 3
etc.
What I would like to do is find a way to poll a bunch of OIDs and plot the great returned value +1 (thus showing a user count). Where do I start?
for example...
OID Value
.1.3.......1.1.1 0
.1.3.......1.1.2 1
.1.3.......1.1.3 2
.1.3.......1.1.4 3
etc.
What I would like to do is find a way to poll a bunch of OIDs and plot the great returned value +1 (thus showing a user count). Where do I start?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Does the MIB currently include an OID of the number of children similar to the ifMib? If so, that's your answer. Otherwise, a simple php script server script to walk the tree and return the number of rows is what I see as your answer.
TheWitness
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?
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?
Hey, this stuff sure is confusing. First off, I am running Cacti on a W2k3 server. Secondly here is what happens when a user connects via VPN.
If there are currently 0 users connected than the MIB tree terminates at:
.1.3.6.1.4.1.12356.9.1.1
When the first user connects, the following OID is available:
.1.3.6.1.4.1.12356.9.1.1.1.1 returns 0
When the second user connects, the following OIDs are available:
.1.3.6.1.4.1.12356.9.1.1.1.1 returns 0
.1.3.6.1.4.1.12356.9.1.1.1.2 returns 1
When the third user connects, the following OIDs are available:
.1.3.6.1.4.1.12356.9.1.1.1.1 returns 0
.1.3.6.1.4.1.12356.9.1.1.1.2 returns 1
.1.3.6.1.4.1.12356.9.1.1.1.3 returns 2
Let's say the second user disconnects. Then the following OIDs are available:
.1.3.6.1.4.1.12356.9.1.1.1.1 returns 0
.1.3.6.1.4.1.12356.9.1.1.1.3 returns 2
I guess what I am looking for is a script that can check 20 OIDs. If the OID is valid then return a "1" for that OID. Do that for each OID I list, and then sum up the "1"s that should yield a current VPN user count. The device is a Fortinet F60 and I wish there was an OID that did this automatically, but I have walked the whole treee and found nothing.
Simply put, I have no idea how to script for cacti. So any help, be it a really good tutorial, the finished script, a skeleton script, anything, would be greatly appreciated. Thanks in advance!!!
If there are currently 0 users connected than the MIB tree terminates at:
.1.3.6.1.4.1.12356.9.1.1
When the first user connects, the following OID is available:
.1.3.6.1.4.1.12356.9.1.1.1.1 returns 0
When the second user connects, the following OIDs are available:
.1.3.6.1.4.1.12356.9.1.1.1.1 returns 0
.1.3.6.1.4.1.12356.9.1.1.1.2 returns 1
When the third user connects, the following OIDs are available:
.1.3.6.1.4.1.12356.9.1.1.1.1 returns 0
.1.3.6.1.4.1.12356.9.1.1.1.2 returns 1
.1.3.6.1.4.1.12356.9.1.1.1.3 returns 2
Let's say the second user disconnects. Then the following OIDs are available:
.1.3.6.1.4.1.12356.9.1.1.1.1 returns 0
.1.3.6.1.4.1.12356.9.1.1.1.3 returns 2
I guess what I am looking for is a script that can check 20 OIDs. If the OID is valid then return a "1" for that OID. Do that for each OID I list, and then sum up the "1"s that should yield a current VPN user count. The device is a Fortinet F60 and I wish there was an OID that did this automatically, but I have walked the whole treee and found nothing.
Simply put, I have no idea how to script for cacti. So any help, be it a really good tutorial, the finished script, a skeleton script, anything, would be greatly appreciated. Thanks in advance!!!
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
How many of these devices do you intend on graphing?
TheWitness
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
This one is easy in a php script server. YOu will walk the entire mib using cacti_snmp_walk and then count the total rows using the "sizeof" command and that will be the number of connected users. You don't need to go anywhere otherthan there.
TheWitness
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?
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?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
The ss_host_cpu.php is a good one. Focus on the Index portion. The sizeof parameter is the number of connections. However, you are not running a query but rather a script server script similar to ss_sql.php
TheWitness
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?
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?
Who is online
Users browsing this forum: No registered users and 2 guests