Issue with a data query

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

Moderators: Developers, Moderators

Post Reply
Vasche
Posts: 9
Joined: Tue Oct 01, 2024 9:35 am

Issue with a data query

Post by Vasche »

hi, I need to connect a script created by me for monitoring RxPower with an Oid that must be asked before creating the graph.
the code for the Rx is :
#!/bin/bash

# OID per i valori specifici Huawei (modifica in base alle esigenze)
value_oid=".1.3.6.1.4.1.2011.5.25.31.1.1.3.1.32"
snmp_version="2c" # Utilizza SNMPv2c per Huawei
porta="$3"

# Verifica che l'IP sia passato come argomento
if [ -z "$1" ]; then
echo "Errore: L'indirizzo IP non è stato fornito."
exit 1
fi

ip="$1"

if [ -z "$2" ]; then
echo "La community non è stata fornita."
exit 1
fi


# Usa l'argomento passato come IP
community="$2"

# Esegui snmpwalk per ottenere i valori
values=$(snmpwalk -v "$snmp_version" -c "$community" "$ip" "$value_oid")

# Verifica se il comando ha prodotto output
if [ -z "$values" ]; then
echo "Errore: Nessun valore trovato per l'IP e OID forniti."
exit 1
fi

# Filtra e mostra solo i valori che contengono esattamente 4 numeri separati da virgole
echo "$values" | while read -r line; do
# Estrai il valore
value=$(echo "$line" | awk -F ': ' '{print $2}' | tr -d '"')

# Verifica se il valore contiene esattamente 4 numeri separati da virgole
if [[ $(echo "$value" | tr ',' '\n' | wc -l) -eq 4 ]]; then
# Stampa i valori nel formato "campo:valore"
IFS=',' read -r RxPower1 RxPower2 RxPower3 RxPower4 <<< "$value"
echo "RxPower1:$RxPower1"
echo "RxPower2:$RxPower2"
echo "RxPower3:$RxPower3"
echo "RxPower4:$RxPower4"
fi
done


and i need to take from a data query the oid from the port who choice the user... can anyone help me with the xml?
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Issue with a data query

Post by macan »

You need it only for few ports? If yes, maybe easier way is create single user graph for every port.
https://docs.cacti.net/Graph-a-Single-SNMP-OID.md

Example (for interface traffic):
1) list of interfaces:
snmpwalk -c community -v2c 127.0.0.1 1.3.6.1.2.1.2
IF-MIB::ifNumber.0 = INTEGER: 2
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: *vmx0*
IF-MIB::ifDescr.2 = STRING: *lo0*
IF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifType.2 = INTEGER: softwareLoopback(24)
IF-MIB::ifMtu.1 = INTEGER: 1500
IF-MIB::ifMtu.2 = INTEGER: 16384
IF-MIB::ifSpeed.1 = Gauge32: 1410065408
IF-MIB::ifSpeed.2 = Gauge32: 0
IF-MIB::ifPhysAddress.1 = STRING: 0:c:29:3f:17:fb
IF-MIB::ifPhysAddress.2 = STRING:
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: up(1)
IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00
IF-MIB::ifLastChange.2 = Timeticks: (0) 0:00:00.00
IF-MIB::ifInOctets.1 = Counter32: *354633346*
IF-MIB::ifInOctets.2 = Counter32: *2800577744*
IF-MIB::ifInUcastPkts.1 = Counter32: 158014457
IF-MIB::ifInUcastPkts.2 = Counter32: 2463068978
IF-MIB::ifInNUcastPkts.1 = Counter32: 832848
...

ok, let's graph inOctets for vmx0 and lo0. We need OID:
snmpwalk -c community -On -v2c 127.0.0.1 1.3.6.1.2.1.2
.1.3.6.1.2.1.2.1.0 = INTEGER: 2
.1.3.6.1.2.1.2.2.1.1.1 = INTEGER: 1
.1.3.6.1.2.1.2.2.1.1.2 = INTEGER: 2
.1.3.6.1.2.1.2.2.1.2.1 = STRING: vmx0
.1.3.6.1.2.1.2.2.1.2.2 = STRING: lo0
.1.3.6.1.2.1.2.2.1.3.1 = INTEGER: ethernetCsmacd(6)
.1.3.6.1.2.1.2.2.1.3.2 = INTEGER: softwareLoopback(24)
.1.3.6.1.2.1.2.2.1.4.1 = INTEGER: 1500
.1.3.6.1.2.1.2.2.1.4.2 = INTEGER: 16384
.1.3.6.1.2.1.2.2.1.5.1 = Gauge32: 1410065408
.1.3.6.1.2.1.2.2.1.5.2 = Gauge32: 0
.1.3.6.1.2.1.2.2.1.6.1 = STRING: 0:c:29:3f:17:fb
.1.3.6.1.2.1.2.2.1.6.2 = STRING:
.1.3.6.1.2.1.2.2.1.7.1 = INTEGER: up(1)
.1.3.6.1.2.1.2.2.1.7.2 = INTEGER: up(1)
.1.3.6.1.2.1.2.2.1.8.1 = INTEGER: up(1)
.1.3.6.1.2.1.2.2.1.8.2 = INTEGER: up(1)
.1.3.6.1.2.1.2.2.1.9.1 = Timeticks: (0) 0:00:00.00
.1.3.6.1.2.1.2.2.1.9.2 = Timeticks: (0) 0:00:00.00
*.1.3.6.1.2.1.2.2.1.10.1* = Counter32: 354724346
*.1.3.6.1.2.1.2.2.1.10.2* = Counter32: 2800584541
.1.3.6.1.2.1.2.2.1.11.1 = Counter32: 158014903
.1.3.6.1.2.1.2.2.1.11.2 = Counter32: 2463069070
.1.3.6.1.2.1.2.2.1.12.1 = Counter32: 832848

So we need create single oid graph for .1.3.6.1.2.1.2.2.1.10.1 and .1.3.6.1.2.1.2.2.1.10.2
Let the Cacti grow!
Vasche
Posts: 9
Joined: Tue Oct 01, 2024 9:35 am

Re: Issue with a data query

Post by Vasche »

The OID i want to graph have 4 value, iso.3.6.1.4.1.2011.5.25.31.1.1.3.1.32.********* = STRING: "-4.01,-0.35,-11.08,37.90"
I think i can't use the basic template for this? or i can? If i can i can use my script? thanks for the answer,
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Issue with a data query

Post by macan »

you didn't say that returned value is not number.
You can use this
https://docs.cacti.net/How-To-Create-Da ... -Method.md

There is perl script but use php is better. Your script expecting 2 paramateres (ip and port)
Data input method will be second parametr (port) without special type code.
Data source (data template) - checkbox port must be on
Let the Cacti grow!
Vasche
Posts: 9
Joined: Tue Oct 01, 2024 9:35 am

Re: Issue with a data query

Post by Vasche »

sorry for my lack of knowledge about cacti. Theoretically if I use the script in: Walkthrough: Script with more Output Parameters it shouldn't be fine because I need to have dynamic oids since they change from switch to switch. can you help me? Thank you.
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Issue with a data query

Post by macan »

I show you how to pass a parameter to a script. This parameter can be the IP address of the device. Your script, which is called with this parameter, has to sort out the dynamic OID and only send the output, which is then cacti graphing.

what device is it? Maybe there is already a template
Let the Cacti grow!
Vasche
Posts: 9
Joined: Tue Oct 01, 2024 9:35 am

Re: Issue with a data query

Post by Vasche »

Hi, I've already passed the IP along with the community. only that I would need to pass the last piece of the OID. example: iso.3.6.1.4.1.2011.5.25.31.1.1.3.1.32.674723** = ""
iso.3.6.1.4.1.2011.5.25.31.1.1.3.1.32.674857** = ""
iso.3.6.1.4.1.2011.5.25.31.1.1.3.1.32.674858** = STRING: "-3.36,-0.35,-10.42,37.90"
iso.3.6.1.4.1.2011.5.25.31.1.1.3.1.32.674859** = ""
iso.3.6.1.4.1.2011.5.25.31.1.1.3.1.32.674859** = ""
the four number is the rx power and the model is Huawei switch s6730-H. Thanks
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Issue with a data query

Post by macan »

Let the Cacti grow!
Vasche
Posts: 9
Joined: Tue Oct 01, 2024 9:35 am

Re: Issue with a data query

Post by Vasche »

hi, when i put the file the debug say
from the data query:
Total: 0.000000, Delta: 0.000000, Running data query [26].
Total: 0.000000, Delta: 0.000000, Found type = '4' [Script Query].
Total: 0.000000, Delta: 0.000000, Found data query XML file at '/usr/share/cacti/site/resource/snmp_queries/cacti_huawei_templates'
Total: 0.000000, Delta: 0.000000, XML file parsed ok.
Total: 0.000000, Delta: 0.000000, <arg_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting arg_index entries
Total: 0.000000, Delta: 0.000000, Executing script for list of indexes ' ', Index Count: 0
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: query_name in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_query in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: query_name in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_query in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: query_name in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_query in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: query_name in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_query in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 303 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 303
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 110 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 303 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_index in file: /usr/share/cacti/site/lib/data_query.php on line: 303
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: query_name in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_query in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: query_name in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_query in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: query_name in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_query in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: query_name in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 324 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_query in file: /usr/share/cacti/site/lib/data_query.php on line: 324
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 303 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: script_path in file: /usr/share/cacti/site/lib/data_query.php on line: 303
2024/10/04 13:02:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/host.php: 103 host_reload_query)(/host.php: 576 run_data_query)(/lib/data_query.php: 90 query_script_host)(/lib/data_query.php: 303 CactiErrorHandler)(/lib/functions.php: 4590 cacti_debug_backtrace)
2024/10/04 13:02:23 - ERROR PHP NOTICE: Undefined index: arg_index in file: /usr/share/cacti/site/lib/data_query.php on line: 303
can you help me? thanks
Vasche
Posts: 9
Joined: Tue Oct 01, 2024 9:35 am

Re: Issue with a data query

Post by Vasche »

probably i think the issue is in the 4 value the string put: iso.3.6.1.4.1.2011.5.25.31.1.1.3.1.32.67485*** = STRING: "1.21,2.99,-6.34,40.52"
Probably i need an xml who can read and graph this value.
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Issue with a data query

Post by macan »

your script is broken now. A lot of errors like:
ERROR PHP NOTICE: Undefined index: script_path
ERROR PHP NOTICE: Undefined index: arg_query
...

Cacti can graph single value like 1.21 or 40.52. Cacti doesn't graph 2.99-6.34. And cacti doesn't not graph "1.21,2.99,-6.34,40.52" together. If you want to graph more things you need use script or script server data.

https://docs.cacti.net/PHP-Script-Server.md
https://docs.cacti.net/How-To-Script-Data-Queries.md
Let the Cacti grow!
Vasche
Posts: 9
Joined: Tue Oct 01, 2024 9:35 am

Re: Issue with a data query

Post by Vasche »

thanks but it didn't help me much. But the moment I create um SNMP - Generic OID Template I noticed that it asks me for the oid. A solution like this would suit me anyway, how can I reply? A thousand thanks.
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Issue with a data query

Post by macan »

It seems that power is normal snmp table. So you need https://docs.cacti.net/How-To-Script-Data-Queries.md
Your script is only small part of it.
Let the Cacti grow!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests