Avaya CM

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

Moderators: Developers, Moderators

Post Reply
Punchic
Posts: 2
Joined: Tue Jun 22, 2010 5:14 am

Avaya CM

Post by Punchic »

Hi all.

This is my first script.

I tried to monitor trunk group load, and everything is ok, except snmp timeout.

But when I want to view dsp resources, i've got problems:

Script based on "Generic SNMPwalk to retrieve multiple values in one run"

Code: Select all

<?php

/* do NOT run this script through a web browser */
if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD'])  || isset($_SERVER['REMOTE_ADDR'])) {
   die("<br><strong>This script is only meant to run at the command line.</strong>");
}

$no_http_headers = true;

/* display No errors */
error_reporting(E_ERROR);

include_once(dirname(__FILE__) . "/../lib/snmp.php");

if (!isset($called_by_script_server)) {
	if (file_exists(dirname(__FILE__) . "/../include/global.php")) {
		include_once(dirname(__FILE__) . "/../include/global.php");
	} else {
		include_once(dirname(__FILE__) . "/../include/config.php");
	} 
	array_shift($_SERVER["argv"]);
	print call_user_func_array("ss_avaya_dsp", $_SERVER["argv"]);
}


function ss_avaya_dsp($hostname, $snmp_community, $snmp_version, $snmp_port, $snmp_timeout, $snmp_auth_username="", $snmp_auth_password="", $snmp_auth_protocol="", $snmp_priv_passphrase="", $snmp_priv_protocol="", $snmp_context="") {
	
	
	$result = 0;

	$arr = cacti_snmp_walk($hostname, $snmp_community, ".1.3.6.1.4.1.6889.2.9.1.4.6.1.2", $snmp_version, $snmp_auth_username, $snmp_auth_password, $snmp_auth_protocol, $snmp_priv_passphrase, $snmp_priv_protocol, $snmp_context, $snmp_port, $snmp_timeout, read_config_option("snmp_retries"), SNMP_POLLER);
	for ($i=0;($i<sizeof($arr));$i++) {
		if (is_numeric($arr[$i]["value"])) {
			$result += $arr[$i]["value"];
		}
	}
	$cacti_result = "TotalDSPChannels:" . trim($result);
	$result = 0;
	$arr = cacti_snmp_walk($hostname, $snmp_community, ".1.3.6.1.4.1.6889.2.9.1.4.6.1.3", $snmp_version, $snmp_auth_username, $snmp_auth_password, $snmp_auth_protocol, $snmp_priv_passphrase, $snmp_priv_protocol, $snmp_context, $snmp_port, $snmp_timeout, read_config_option("snmp_retries"), SNMP_POLLER);
	for ($i=0;($i<sizeof($arr));$i++) {
		if (is_numeric($arr[$i]["value"])) {
			$result += $arr[$i]["value"];
		}
	}

	$cacti_result = $cacti_result." ActiveDSPChannels:" . trim($result);
	return $cacti_result;
}

?>
It returns "TotalDSPChannels:80 ActiveDSPChannels:0" and "PM - CMDPHP: Poller[0] WARNING: SNMP Walk Timeout for Host:'192.168.1.220', and OID:'.1.3.6.1.4.1.6889.2.9.1.4.6.1.3'"

But

Code: Select all

C:\net-snmp\bin>snmpwalk.exe -c public -v 2c -t 0.5 192.168.1.220 .1.3.6.1.4.1.6889.2.9.1.4.6.1.3
SNMPv2-SMI::enterprises.6889.2.9.1.4.6.1.3.101.1 = INTEGER: 9
SNMPv2-SMI::enterprises.6889.2.9.1.4.6.1.3.101.2 = INTEGER: 7
SNMPv2-SMI::enterprises.6889.2.9.1.4.6.1.3.101.3 = INTEGER: 3
SNMPv2-SMI::enterprises.6889.2.9.1.4.6.1.3.101.4 = INTEGER: 5
Any ideas?

Script and template to monitor trunks in atachment.
Attachments
cacti_graph_template_avaya_cm_trunks.xml
Graph Template
(12.61 KiB) Downloaded 1453 times
ss_avaya_trunks.php.txt
Script Server script. Remove .txt extension and place in the scripts folder on your server.
(4.34 KiB) Downloaded 1098 times
avaya_trunk_load.jpg
avaya_trunk_load.jpg (46.72 KiB) Viewed 22165 times
ddk
Posts: 5
Joined: Wed Jul 07, 2010 1:06 am

Post by ddk »

Hello,
i try to import your template? but i have "Error: XML: Hash version does not exist."

my caccti version - Version 0.8.7d
but in my global_config.php i'm add support for 0.8.7e

Code: Select all

$hash_version_codes = array(                                                                                                                                
        "0.8.4"  => "0000",                                                                                                                                 
        "0.8.5"  => "0001",                                                                                                                                 
        "0.8.5a" => "0002",                                                                                                                                 
        "0.8.6"  => "0003",                                                                                                                                 
        "0.8.6a" => "0004",                                                                                                                                 
        "0.8.6b" => "0005",                                                                                                                                 
        "0.8.6c" => "0006",                                                                                                                                 
        "0.8.6d" => "0007",                                                                                                                                 
        "0.8.6e" => "0008",                                                                                                                                 
        "0.8.6f" => "0009",                                                                                                                                 
        "0.8.6g" => "0010",                                                                                                                                 
        "0.8.6h" => "0011",                                                                                                                                 
        "0.8.6i" => "0012",                                                                                                                                 
        "0.8.6j" => "0013",                                                                                                                                 
        "0.8.7"  => "0014",                                                                                                                                 
        "0.8.7a" => "0015",                                                                                                                                 
        "0.8.7b" => "0016",                                                                                                                                 
        "0.8.7c" => "0017",                                                                                                                                 
        "0.8.7d" => "0018",                                                                                                                                 
        "0.8.7e" => "0019"                                                                                                                                  
        );
what i'm doing wrong? :)
Punchic
Posts: 2
Joined: Tue Jun 22, 2010 5:14 am

Post by Punchic »

Add "0.8.7f" => "0020"
ipmonkey
Posts: 1
Joined: Tue Jul 20, 2010 9:09 am

Post by ipmonkey »

OK, I too have imported this and all seems to have worked. However I am not getting any data on the graphs.

I am running a pair of 8700 servers with 16 further gateways and a couple of ESS servers.

There are 25 odd trunks on various sites.

Essentially I was wondering if it was possible to have a graph per trunk per site.

Where are the trunks configured/identified?

many thanks
leviettrung1810
Posts: 2
Joined: Thu Jan 12, 2012 11:41 pm

Re: Avaya CM

Post by leviettrung1810 »

Dearr Punchic,
When I selected "Create Graph from 'Avaya CM Trunks'"
It required me to provide some information:
1) Index Type
2) Index Value
3) Output Type ID
So, what information i need to input here?
I am new Cacti, could you please advice me?

Many thanks for your supports,

Trung Le Viet
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests