Archived community.zenoss.org | full text search
Skip navigation
1 2 3 Previous Next 148483 Views 30 Replies Latest reply: Dec 8, 2009 10:50 PM by Matt Ray RSS
Matt Ray Rank: Zen Master 2,484 posts since
Apr 5, 2008
Currently Being Moderated

Jun 26, 2009 11:32 PM

New ODBC Datasource ZenPack

Zenoss Community member Egor Puzanov has generously provided a new
ODBC Datasource ZenPack. The ZenODBC ZenPack implements the ODBC
DataSource and uses the commandParser from Zenoss 2.4. It has an ODBC
Modeler Plugin class (Python Plugin wrapper) which can be used by
other ZenPacks. It is used as the basis for the MySQL ODBC, MS SQL
ODBC and PostgreSQL ODBC) ZenPacks.

ODBC Datasource: http://www.zenoss.com/community/projects/zenpacks/zenodbc
Community ZenPack Repository: trac-zenpacks/wiki/ZenPackscommunityZenODBC

Thanks Egor!

Thanks,Matt Ray
Zenoss Community Manager
community.zenoss.com
mray@zenoss.com



_______________________________________________
zenoss-zenpacks mailing list
zenoss-zenpacks@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-zenpacks
  • j053ph4 Rank: Green Belt 290 posts since
    Dec 19, 2008
    Currently Being Moderated
    1. Jun 30, 2009 11:47 AM (in response to Matt Ray)
    RE: New ODBC Datasource ZenPack
    has anyone had any luck getting this or the ODBC zenpacks to work?

    -Joseph
  • bigegor ZenossMaster 208 posts since
    Apr 23, 2009
    Currently Being Moderated
    2. Jun 30, 2009 2:42 PM (in response to j053ph4)
    RE: New ODBC Datasource ZenPack
    yes
  • j053ph4 Rank: Green Belt 290 posts since
    Dec 19, 2008
    Currently Being Moderated
    3. Jun 30, 2009 3:39 PM (in response to bigegor)
    RE: New ODBC Datasource ZenPack
    As a test, i'm trying to use this (actually the related MySQL ODBC monitor) on localhost (zenoss server).

    The other MySQL zenpack (core) works already, and I have made sure that the mysql-odbc driver is installed.

    /etc/odbcinst.ini has the following (odbc.ini is blank):

    # Driver from the MyODBC package
    # Setup from the unixODBC package
    [MySQL]
    Description = ODBC for MySQL
    Driver = /usr/lib/libmyodbc.so
    Setup = /usr/lib/libodbcmyS.so
    FileUsage = 1


    From the zenpack notes (web), it looks like there are multiple dependencies:

    MySQL ODBC -> ODBC -> RDBMS -> Adv Device Details

    All of these zenpacks have been installed, and zCollectorPlugins includes:

    community.snmp.DatabaseMap
    community.odbc.OdbcPlugin
    community.odbc.MySqlDatabaseMap

    when I run zenmodeler, i see the following output:

    2009-06-30 14:41:40 INFO zen.Utils Executing command: /opt/zenoss/bin/zenmodeler run --now --monitor localhost -F -d localhost --weblog
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Run in foreground, starting immediately.
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Starting PBDaemon initialization
    2009-06-30 14:41:41 INFO zen.ZenModeler Connecting to localhost:8789
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Logging in as admin
    2009-06-30 14:41:41 INFO zen.ZenModeler Connected to ZenHub
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Setting up initial services: EventService, ModelerService
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Chaining getInitialServices with d2
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded service EventService from zenhub
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded service ModelerService from zenhub
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Queueing event {'severity': 0, 'component': 'zenmodeler', 'agent': 'zenmodeler', 'summary': 'started', 'manager': 'localhost', 'device': 'localhost', 'eventClass': '/App/Start'}
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Total of 1 queued events
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Calling connected.
    2009-06-30 14:41:41 DEBUG zen.ZenModeler fetching monitor properties
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Getting threshold classes...
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loading classes ['Products.ZenModel.MinMaxThreshold', 'ZenPacks.community.PointThreshold.thresholds.PointThreshold', 'ZenPacks.community.PredictiveThreshold.thresholds.PredictiveThreshold', 'ZenPacks.community.RangeThreshold.thresholds.RangeThreshold']
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Fetching default RRDCreateCommand...
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Getting collector thresholds...
    2009-06-30 14:41:41 DEBUG zen.thresholds Updating threshold ('zeneventlog cycle time', ('localhost', ''))
    2009-06-30 14:41:41 DEBUG zen.thresholds Updating threshold ('zenmodeler cycle time', ('localhost', ''))
    2009-06-30 14:41:41 DEBUG zen.thresholds Updating threshold ('zenperfsnmp cycle time', ('localhost', ''))
    2009-06-30 14:41:41 DEBUG zen.thresholds Updating threshold ('zenping cycle time', ('localhost', ''))
    2009-06-30 14:41:41 DEBUG zen.thresholds Updating threshold ('zenprocess cycle time', ('localhost', ''))
    2009-06-30 14:41:41 DEBUG zen.thresholds Updating threshold ('zenwin cycle time', ('localhost', ''))
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Getting collector plugins for each DeviceClass
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Starting collector loop...
    2009-06-30 14:41:41 INFO zen.ZenModeler Collecting for device localhost
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.DeviceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin HPDeviceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin DellDeviceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.InterfaceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.RouteMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.IpServiceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.HRFileSystemMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.HRSWRunMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin HPCPUMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin DellCPUMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin DellPCIMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin community.snmp.DatabaseMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin community.odbc.OdbcPlugin
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin community.odbc.MySqlDatabaseMap
    2009-06-30 14:41:41 INFO zen.ZenModeler No WMI plugins found for localhost
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.DeviceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin HPDeviceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin DellDeviceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.InterfaceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.RouteMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.IpServiceMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.HRFileSystemMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin zenoss.snmp.HRSWRunMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin HPCPUMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin DellCPUMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin DellPCIMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin community.snmp.DatabaseMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin community.odbc.OdbcPlugin
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Loaded plugin community.odbc.MySqlDatabaseMap
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Using community.odbc.OdbcPlugin on localhost
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Using community.odbc.MySqlDatabaseMap on localhost
    2009-06-30 14:41:41 INFO zen.ZenModeler Python collection device localhost
    2009-06-30 14:41:41 INFO zen.ZenModeler plugins: community.odbc.OdbcPlugin, community.odbc.MySqlDatabaseMap
    2009-06-30 14:41:41 DEBUG zen.PythonClient Running collection for plugin community.odbc.OdbcPlugin
    2009-06-30 14:41:41 ERROR zen.ZenModeler Unable to fill collection slots: [Failure instance: Traceback (failure with no frames): exceptions.ValueError: need more than 1 value to unpack ]
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Collection slots filled
    2009-06-30 14:41:41 DEBUG zen.ZenModeler Running 1 clients
    2009-06-30 14:44:41 DEBUG zen.ZenModeler Running 1 clients
    2009-06-30 14:44:42 WARNING zen.ZenModeler Client localhost timeout
    2009-06-30 14:44:42 DEBUG zen.ZenModeler Running 0 clients
    2009-06-30 14:44:42 INFO zen.ZenModeler Scan time: 180.36 seconds
    2009-06-30 14:44:42 DEBUG zen.thresholds Checking value 180.360131025 on Daemons/localhost/zenmodeler_cycleTime
    2009-06-30 14:44:42 DEBUG zen.MinMaxCheck Checking zenmodeler_cycleTime 180.360131025 against min None and max 34560.0
    2009-06-30 14:44:42 DEBUG zen.ZenModeler Queueing event {'manager': 'localhost', 'eventKey': 'zenmodeler cycle time', 'device': 'localhost', 'eventClass': '/Perf', 'summary': 'Threshold of zenmodeler cycle time restored: current value: 180.36', 'component': '', 'agent': 'zenmodeler', 'severity': 0}
    2009-06-30 14:44:42 DEBUG zen.ZenModeler Total of 1 queued events
    2009-06-30 14:44:42 DEBUG zen.ZenModeler Sent a 'stop' event
    2009-06-30 14:44:42 DEBUG zen.ZenModeler stop() called when not running
    2009-06-30 14:44:42 INFO zen.ZenModeler Daemon ZenModeler shutting down
    2009-06-30 14:44:42 DEBUG zen.ZenModeler Removing service EventService
    2009-06-30 14:44:42 DEBUG zen.ZenModeler Removing service ModelerService
    2009-06-30 14:44:43 INFO zen.ZenModeler zenmodeler shutting down
    2009-06-30 14:44:43 INFO zen.PerformanceConf configuration collected

    I don't see any modifications to the "Software" tab (like the screenshots), and the "Perf" graphs also do not render. zencommand appears not to run any relevant commands to collect the data.


    Any advice on how to proceed from here?

    Thanks,
    -Joseph
  • bigegor ZenossMaster 208 posts since
    Apr 23, 2009
    Currently Being Moderated
    4. Jun 30, 2009 4:41 PM (in response to j053ph4)
    RE: New ODBC Datasource ZenPack
    delete from zCollectorPlugins this plugins.

    community.snmp.DatabaseMap - it collect informations over SNMP from RDBMS-MIB compatible databases (Ingres or Postgresql with pgsnmpd)
    community.odbc.OdbcPlugin - wrapper for python collector plugin.

    check port number in zMySqlConnectionString, i think MySQL in Zenoss-stack used port 3307
  • j053ph4 Rank: Green Belt 290 posts since
    Dec 19, 2008
    Currently Being Moderated
    5. Jun 30, 2009 4:47 PM (in response to bigegor)
    RE: New ODBC Datasource ZenPack
    Thanks,

    I've done as you suggested (removed the other collector plugins), and double-checked that 3306 is the correct port (i'm using the rpm, not stack).

    Still not seeing that the collector plugins find anything...

    -Joseph
  • bigegor ZenossMaster 208 posts since
    Apr 23, 2009
    Currently Being Moderated
    6. Jun 30, 2009 5:01 PM (in response to j053ph4)
    RE: New ODBC Datasource ZenPack
    Have You changed default zMySqlConnectionString?
  • j053ph4 Rank: Green Belt 290 posts since
    Dec 19, 2008
    Currently Being Moderated
    7. Jun 30, 2009 5:11 PM (in response to bigegor)
    RE: New ODBC Datasource ZenPack
    I tried once to remove the "OPTION=3" parameter, but now it is back to default:

    DRIVER={MySQL};OPTION=3;PORT=3306
  • bigegor ZenossMaster 208 posts since
    Apr 23, 2009
    Currently Being Moderated
    8. Jun 30, 2009 5:31 PM (in response to j053ph4)
    RE: New ODBC Datasource ZenPack
    can you connect to database with isql and one of DSNs from /home/zenoss/.odbc.ini?
  • j053ph4 Rank: Green Belt 290 posts since
    Dec 19, 2008
    Currently Being Moderated
    9. Jul 1, 2009 9:48 AM (in response to bigegor)
    RE: New ODBC Datasource ZenPack
    Thanks for the suggestion...i tried this and it appears to be at least most of the problem...

    Looks like there was a bad library reference for the mysql ODBC driver.

    The default /etc/odbcinst.ini had:

    Driver from the MyODBC package
    # Setup from the unixODBC package
    [MySQL]
    Description = ODBC for MySQL
    Driver = /usr/lib/libmyodbc.so
    Setup = /usr/lib/libodbcmyS.so
    FileUsage = 1


    While the actual files were:

    # Driver from the MyODBC package
    # Setup from the unixODBC package
    [MySQL]
    Description = ODBC for MySQL
    Driver = /usr/lib/libmyodbc3.so
    Setup = /usr/lib/libodbcmy3_r.so
    FileUsage = 1


    I try this and isql appears to function from the command line:

    [root@fpnag001 ~]# isql -v MySQL-test
    +---------------------------------------+
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    +---------------------------------------+

    Still no luck with the graphs, though.

    Does the connection for locahost need to be defined in /etc/odbc.ini? Or do the zenoss zProperties and template configs perform the same function?

    Thanks again for your help...

    -Joseph
  • j053ph4 Rank: Green Belt 290 posts since
    Dec 19, 2008
    Currently Being Moderated
    10. Jul 1, 2009 9:52 AM (in response to j053ph4)
    RE: New ODBC Datasource ZenPack
    I do have this now, though:

    2009-07-01 08:53:30 DEBUG zen.PythonClient Results for community.odbc.MySqlDatabaseMap: {'databases': [{'type': 'InnoDB', 'dbname': 'events'}, {'type': 'MEMORY', 'dbname': 'information_schema'}, {'type': 'MyISAM', 'dbname': 'test'}]}
  • j053ph4 Rank: Green Belt 290 posts since
    Dec 19, 2008
    Currently Being Moderated
    11. Jul 1, 2009 10:21 AM (in response to j053ph4)
    RE: New ODBC Datasource ZenPack
    it looks like the graph still doesn't draw...should I be seeing an entry in the zencommand.log? Also, do i need to directly modify any of the template variables?

    Thanks,
    Joseph
  • bigegor ZenossMaster 208 posts since
    Apr 23, 2009
    Currently Being Moderated
    12. Jul 1, 2009 2:29 PM (in response to j053ph4)
    RE: New ODBC Datasource ZenPack
    No. You don't need to modify any of the template variables.

    Templates description:
    MySQL - is Device template, you must bind it to monitore device. They do the same things like MySQLMonitor ZenPack.
    MSqlDatabase - is Component Template and it bind to MySQL database object automatically and monitor size of the database.
  • j053ph4 Rank: Green Belt 290 posts since
    Dec 19, 2008
    Currently Being Moderated
    13. Jul 1, 2009 2:58 PM (in response to bigegor)
    RE: New ODBC Datasource ZenPack
    ahh....found the problem...i had postgresql installed (also testing the pgsnmp subagent), and having the RDBMS collector plugin was preventing the mysql databases from being listed...I also had your mysql ODBC template specifically bound to the device ( so it was blank on the 'perf' tab).

    the databases now show up on the "software" tab where they should. the graphs are not populated (yet), but hopefully they will here in a few mins.

    Just to check...which daemon is updating the data to the template? I assume it would be 'zencommand', but when i run manually i don't see anything for the ODBC queries...

    Thanks again for all of your help...
  • bigegor ZenossMaster 208 posts since
    Apr 23, 2009
    Currently Being Moderated
    14. Jul 1, 2009 3:26 PM (in response to j053ph4)
    RE: New ODBC Datasource ZenPack
    You can monitor more then one type of Database on single Server. After collecting MySQL databases you can set "Lock from Deletion" flag remove MySQL Collector Plugin from zCollectorPlugins. Now you can collect other databases (MsSQL, Postgresql).

    Now ZenODBC used zencommand, but I want replace it with native ODBC daemon based on pyodbc library.
1 2 3 Previous Next

More Like This

  • Retrieving data ...