http://smarts-wiki.com/mediawiki/index.php?title=APG&feed=atom&action=historyAPG - Revision history2024-03-28T17:24:03ZRevision history for this page on the wikiMediaWiki 1.19.2http://smarts-wiki.com/mediawiki/index.php?title=APG&diff=42&oldid=prevLori at 18:51, 16 January 20132013-01-16T18:51:27Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 18:51, 16 January 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 40:</td>
<td colspan="2" class="diff-lineno">Line 40:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>'''Web Links'''</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>'''Web Links'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>http://<del class="diffchange diffchange-inline">phslxapg2</del>.<del class="diffchange diffchange-inline">neteng</del>.<del class="diffchange diffchange-inline">partners.org</del>:58080/APG</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>http://<ins class="diffchange diffchange-inline">apg</ins>.<ins class="diffchange diffchange-inline">domain</ins>.<ins class="diffchange diffchange-inline">com</ins>:58080/APG</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>http://<del class="diffchange diffchange-inline">phslxapg2</del>.<del class="diffchange diffchange-inline">neteng</del>.<del class="diffchange diffchange-inline">partners.org</del>:58080/APG-RPE</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>http://<ins class="diffchange diffchange-inline">apg</ins>.<ins class="diffchange diffchange-inline">domain</ins>.<ins class="diffchange diffchange-inline">com</ins>:58080/APG-RPE</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>'''Show Status of All Services'''</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>'''Show Status of All Services'''</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 248:</td>
<td colspan="2" class="diff-lineno">Line 248:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>/apps/APG/Collecting/Collector-Manager/Default/logs/file-connector</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>/apps/APG/Collecting/Collector-Manager/Default/logs/file-connector</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>Just open file-connector.log and search for all the <del class="diffchange diffchange-inline">occurence </del>containing the name of your polling group. You will see all the properties and all the metrics collected by the SNMP agent for that group. NOTE: Be careful, this file might be very big and eats lot of disk space. Disable it from the collecting.xml once done testing and delete the file-connector under logs to free up some space.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>Just open file-connector.log and search for all the <ins class="diffchange diffchange-inline">occurrence </ins>containing the name of your polling group. You will see all the properties and all the metrics collected by the SNMP agent for that group. NOTE: Be careful, this file might be very big and eats lot of disk space. Disable it from the collecting.xml once done testing and delete the file-connector under logs to free up some space.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><br></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><br></div></td></tr>
</table>Lorihttp://smarts-wiki.com/mediawiki/index.php?title=APG&diff=41&oldid=prevLori: Some useful APG commands2013-01-16T18:49:50Z<p>Some useful APG commands</p>
<p><b>New page</b></p><div><br />
<br />
A collection of possibly useful things one might use with APG by Watch4Net.<br />
<br />
== '''Database Lookups''' ==<br />
<br />
You will have to 1st log onto the mysql database (yourDB, health, master, topology)<br />
<br />
Find available properties for that database<br> <br />
desc data_property_flat;<br />
<br />
Show data in the property (in this case the Mask property)<br />
desc data_property_flat;<br />
<br />
<br><br />
<br />
<br />
== '''Testing for Port on Linux''' ==<br />
<br />
lsof -i :2003<br />
Provides the process ID of the port in use (2003 in this case)<br />
ps -ef |grep 758 <br />
Provides the application running the that process ID<br />
<br />
<br><br />
<br />
<br />
== '''How to Find Database Size (for licensing)''' ==<br />
<br />
SELECT CONCAT(FORMAT(SUM(DATA_LENGTH + INDEX_LENGTH)/ POWER(1024,2),2), ' Mb') AS `Size` <br />
FROM information_schema.TABLES WHERE TABLES.TABLE_TYPE = 'BASE TABLE';<br />
<br />
This should be all on 1 line<br />
<br />
<br><br />
<br />
<br />
== '''APG Commands''' ==<br />
<br />
'''Web Links'''<br />
<br />
http://phslxapg2.neteng.partners.org:58080/APG<br />
<br />
http://phslxapg2.neteng.partners.org:58080/APG-RPE<br />
<br />
'''Show Status of All Services'''<br />
<br />
bin/manage-modules.sh service status ALL<br />
<br />
'''Stop All Services'''<br />
<br />
bin/manage-modules.sh service stop ALL<br />
<br />
'''Start All Services'''<br />
<br />
bin/manage-modules.sh service start ALL<br />
<br />
'''Restart All Services'''<br />
<br />
bin/manage-modules.sh service restart ALL<br />
<br />
<br> '''Reconfigure Default Datastore for a module'''<br />
<br />
bin/manage-modules.sh update cisco-voip-collector Default<br />
<br />
'''Show Installed Services'''<br />
<br />
bin/manage-modules.sh list installed ALL<br />
<br />
'''Install a Service'''<br />
<br />
bin/manage-modules.sh install transaction-collector<br />
<br />
As an example of installing Transactions Collector<br />
<br />
<br> '''Check on Licenses'''<br />
<br />
bin/manage-licenses.sh check<br />
<br />
'''Install Licenses'''<br />
<br />
bin/manage-licenses.sh install LicenseFileName<br />
<br />
'''MySQL Restart - Stop - Start'''<br />
<br />
bin/manage-modules.sh service restart mysql<br />
<br />
bin/manage-modules.sh service stop mysql<br />
<br />
bin/manage-modules.sh service start mysql<br />
<br />
'''Tomcat Restart - Stop - Start'''<br />
<br />
bin/manage-modules.sh service restart tomcat<br />
<br />
bin/manage-modules.sh service stop tomcat<br />
<br />
bin/manage-modules.sh service start tomcat<br />
<br />
'''Logs found in'''<br />
<br />
Alerting-backend /apps/APG/Backends/Alerting-Backend/Default/logs/<br />
<br />
Collector-manager /apps/APG/&gt;Collecting/Collector-Manager/Default/logs/<br />
<br />
Datastore &lt;/apps/APG/Databases/APG-Datastore/Default/data/bh.err<br />
<br />
Event-processing-manager /apps/APG/Event-Processing/Event-Processing-Manager/Default/logs/<br />
<br />
Tomcat /apps/APG/Web-Servers/Tomcat/Default/logs/<br />
<br />
Mysql /apps/APG/Databases/MySQL/Default/logs/apg-mysql-default.out<br />
<br />
'''Check an XML file for proper formation'''<br />
<br />
--noout allows you to see just the errors and not the entire file<br />
<br />
/usr/bin/xmllint --noout fileName.xml<br />
<br />
<br> '''Change Tomcat Service connections'''<br />
<br />
vi Web-Servers/Tomcat/Default/conf/server.xml<br />
<br />
<br> '''DataStore Access'''<br />
<br />
Databases/APG-Datastore/Default/bin/datastore-client.sh<br />
<br />
<br><br />
<br />
== '''SMARTS Events Element Names''' ==<br />
<br />
To get the current list of ElementClassName from the Datastore not MySQL<br />
<br />
./datastore-client.sh<br />
Enter username: [apg]<br />
Enter database: [events]<br />
Enter password:<br />
<br />
mysql&gt; SELECT DISTINCT elementClassName FROM events_archive;<br />
+----------------------------+<br />
| elementClassName |<br />
+----------------------------+<br />
| Host |<br />
| |<br />
| Switch |<br />
| CallManager |<br />
| IPPhoneGroup |<br />
| IP |<br />
| HSRPGroup |<br />
| Node |<br />
| NetworkConnection |<br />
| VoipPerformanceManager |<br />
| Router |<br />
| CallManagerRedundancyGroup |<br />
| TrunkCable |<br />
| GatewayService |<br />
| VoipCluster |<br />
| VoiceMailService |<br />
| VoipProcess |<br />
| VoipApplication |<br />
| CallProcessor |<br />
| VoiceMailApplication |<br />
| Firewall |<br />
| Session |<br />
| Cable |<br />
| Card |<br />
| CTIService |<br />
| VoipNetworkService |<br />
| MediaGateway |<br />
| InChargeService |<br />
| Partition |<br />
| Probe |<br />
| MediaService |<br />
| SNMPAgent |<br />
| VoipElement |<br />
| FileServer |<br />
| VRF |<br />
| LoadBalancer |<br />
+----------------------------+<br />
<br />
<br><br />
<br />
<br />
== '''Refresh APG properties''' ==<br />
<br />
1. Restart the collector service<br />
<br />
2. Wait 5 minutes<br />
<br />
3. Run the telnet command<br />
<br />
telnet localhost 2001<br />
<br />
COMMITALL<br />
Wait for OK<br />
Ctrl ]<br />
quit<br />
<br />
4. /apps/APG/bin/recreate-data-property.sh<br />
<br />
5. Restart the Tomcat Service to clean the cache<br />
<br />
== '''MySQL Privledges view and Grant commands''' ==<br />
<br />
Databases/MySQL/Default/bin/mysql --defaults-file="/apps/APG/Databases/MySQL/Default/my.cnf" -u root -p mysql<br />
select user, host, db, select_priv, insert_priv, grant_priv from mysql.db;<br />
GRANT ALL ON flow.* TO 'apg'@'apg.domain.comg' IDENTIFIED BY 'watch4net';<br />
<br />
GRANT ALL PRIVILEGES ON events.* TO apg@'apg.domain.com' IDENTIFIED BY 'watch4net';<br />
GRANT ALL PRIVILEGES ON apg.* TO apg@'apg.domain.com' IDENTIFIED BY 'watch4net';<br />
GRANT ALL PRIVILEGES ON master.* TO apg@'apg.domain.com' IDENTIFIED BY 'watch4net';<br />
GRANT ALL PRIVILEGES ON topology.* TO apg@'apg.domain.com' IDENTIFIED BY 'watch4net';<br />
<br />
<br> '''Delete Privileges from MySQL database'''<br />
<br />
delete from mysql.user where host='apg.domain.com';<br />
flush privleges;<br />
<br />
'''MySQL Table Commands'''<br />
<br />
DROP TABLE xxxxx;<br />
SHOW TABLES;<br />
SHOW TABLE STATUS;<br />
SELECT * FROM xxxxx;<br />
check table data_variable;<br />
repair table data_variable;<br />
check table data_property;<br />
repair table data_property;<br />
<br />
== '''Polling Group Tests''' ==<br />
<br />
To check if a poll group is collecting data, click on search (top right corner) and filter on source AND pollgrp where source is the name of your SNMP collector and pollgrp is the name of the poll group you want to check and expand on device (or ip). If your polling group is working properly, you should see some data.<br />
<br />
'''To look at SNMP Poller Data''' connect yourself directly to MySql database and run a command to display all the records with pollgrp='YOUR POLLING GROUP'<br />
<br />
SELECT * FROM data_property_flat WHERE source='name of your source' AND pollgrp='your polling group';<br />
<br />
This command should return some values if the group is polling. If you want to see the raw data polled by this group, select any ID (in the ID field of the output of the query above) and run the following command:<br />
<br />
SELECT * FROM cache_group_* WHERE variable='the id you have picked up from the query above';<br />
<br />
Replace the * with the name of the table you want to poll (an example cache_group_0_1314122400 if you want to check all the values that have been collected since 1314122400 (UNIX time))<br />
<br />
'''File-Connector Troubleshooting Tool''' Enable the file-connector in collecting.xml. This file-connector will display t he values live as they are collected from the devices. If you don't see any entry that belongs to your Polling group, it means that the group is not collecting any data.<br />
<br />
vim Collecting/Collector-Manager/Default/conf/collecting.xml<br />
<br />
/apps/APG/Collecting/Collector-Manager/Default/logs/file-connector<br />
<br />
Just open file-connector.log and search for all the occurence containing the name of your polling group. You will see all the properties and all the metrics collected by the SNMP agent for that group. NOTE: Be careful, this file might be very big and eats lot of disk space. Disable it from the collecting.xml once done testing and delete the file-connector under logs to free up some space.<br />
<br />
<br><br />
<br />
== '''MySQL Data Wipe''' ==<br />
<br />
Deleting the folder /apps/APG/Databases/MySQL/Default/data/apg and its content will delete all collected data. It's like dropping the whole apg database.<br />
<br />
'''Before restarting all services:'''<br />
<br />
a) start up MySQL service ONLY!<br />
b) Connect to MySQL using /apps/APG/bin/mysql-client.sh<br />
c) Make sure the apg database exists with this command: show databases; <br />
in mysql-client.sh, end all commands with a semi-colon<br />
d) If the apg database does not exist, recreate it with this command: CREATE DATABASE apg;<br />
e) Launch the Backend service and let it go for 2-3 minutes so it creates the tables in APG<br />
f) Watch the Backend's log to see if it can connect to the apg database<br />
g) Verify the existence of 2 tables in the apg database with this MySQL command:<br />
SHOW TABLES;<br />
h) Launch other APG services, including the collectors.</div>Lori