[SOLVED] create new data query

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

hum ok. If I want to create a new graph witch 3 datas, how can I make this ? What's the procedure ???

For exemple, I want to create a graph for printer which display 3 element of his MIB.
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

The best way would be to create 3 data sources, and a graph template using these 3 data sources (or one graph per data source, and the Aggregate plugin from Reinhard).
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

hum.

I explain what I want :

I've one printer with IP adress 172.25.124.66 and I want to create one graph with 2 curves in.

These curves are the following :
  • The number of process contexts currently loaded or
    running on this system (OID = .1.3.6.1.2.1.25.1.6.0)

    The maximum number of process contexts this system
    can support (OID = .1.3.6.1.2.1.25.1.7.0)
If I follow your way, I must to create 2 data sources, and a graph using these 2 data sources ?

Its will be able to work ???
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

cyrill wrote:If I follow your way, I must to create 2 data sources, and a graph using these 2 data sources ?

Its will be able to work ???
Yes, create 2 data sources, and a graph template pointing to these 2 data sources.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

ok. I created 2 data sources and a graph template.

How Can I associated my datas sources with my graph template ???
Attachments
processMax.JPG
processMax.JPG (66.14 KiB) Viewed 3004 times
processRun.JPG
processRun.JPG (65.93 KiB) Viewed 3004 times
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

First you have to attach these 2 data sources to a host to get values :wink:
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

ha okey ! I did not know that it was obligatory.

But I don't know how can I associat its to my graph template !
Attachments
processMax.JPG
processMax.JPG (65.09 KiB) Viewed 2999 times
processRun.JPG
processRun.JPG (64.46 KiB) Viewed 2999 times
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Make a copy of the "SNMP - Generic OID" graph template, and add a second "element" (line, stack, you choose) to it.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

ok but I don't find my 2 data sources on the list...
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

First create a graph template, and then add a graph to your device using that graph template.

You should really read this documentation : http://docs.cacti.net/node/503
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

fmangeant wrote:First create a graph template, and then add a graph to your device using that graph template.
Yes yes it's ok for that ! but my 2 data sources aren't associated with my new graph template !

When I edit my new graph template (it's a duplicate of "SNMP - Generic OID Template"), in the box "Graph Template Items ", I click "Add" and when I must choose a data source to use for this graph item, my two new data sources ("Processes Max allowed" and "Processes running or loaded") does't appear in the list...
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

ok I created my new graph with my 2 curves...

if I resume, for create a new graph for a host with n curve(s):

- create n data source(s) with SNMP - Generic OID Template for template
- duplicate a graph template (ex: SNMP - Generic OID Template)
- associate the n data source(s) to the new graph template
- then create a new graph for a host using your new graph template

it's true ?? because I don't have curve in my graph... It's possible that the OID has no value ???
Attachments
perso.JPG
perso.JPG (40.72 KiB) Viewed 2954 times
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Can you post a screenshot of your graph template ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
User avatar
cyrill
Cacti User
Posts: 271
Joined: Fri Jan 25, 2008 8:43 am
Location: California - USA

Post by cyrill »

now that I've understand how create personnal graph, I making another. but I don't have data in ma graph.
Attachments
grpahtemplateJava.JPG
grpahtemplateJava.JPG (61.24 KiB) Viewed 2943 times
javaPersoGraph.JPG
javaPersoGraph.JPG (43.7 KiB) Viewed 2943 times
javaSNMPDta.JPG
javaSNMPDta.JPG (11.46 KiB) Viewed 2943 times
mib.JPG
mib.JPG (7.04 KiB) Viewed 2943 times
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

IMO you have values on your graph, but 0 :)

Are you graphing GAUGEs or COUNTERS ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests