Giter Site home page Giter Site logo

allegro / ralph Goto Github PK

View Code? Open in Web Editor NEW
2.2K 120.0 533.0 71.42 MB

Ralph is the CMDB / Asset Management system for data center and back office hardware.

Home Page: https://ralph.allegro.tech/

License: Apache License 2.0

Python 90.12% Shell 0.50% HTML 4.92% JavaScript 1.67% Makefile 0.13% SCSS 2.65%
dcim django python3 cmdb data-center backoffice assets-management inventory-management inventory hacktoberfest

ralph's Introduction

Ralph

Effective January 1, 2024, all development and maintenance activities associated with the Ralph project on Allegro's GitHub will be discontinued. This means that no further updates or modifications will be applied to the codebase. However, the current version of the code available in the repository will remain the property of the community, allowing individuals to continue contributing to and developing Ralph as they deem appropriate.

Allegro intends to continue the development of Ralph through its internal processes. However, this development will not be publicly accessible, and any updates or modifications made by Allegro will not reflect in the community version of the code. Nevertheless, Allegro may opt to release new versions of Ralph based on its internal development endeavors at a later date.

We express our heartfelt gratitude to everyone who has contributed to Ralph's development thus far. Without the dedicated efforts of the community, Ralph would not have evolved into the powerful tool it is today. Although our active development of Ralph will cease, we encourage the community to persist in utilizing and expanding upon the codebase in the years ahead.

Overview

Ralph is full-featured Asset Management, DCIM and CMDB system for data centers and back offices.

Features:

  • keep track of assets purchases and their life cycle
  • flexible flow system for assets life cycle
  • data center and back office support
  • dc visualization built-in

It is an Open Source project provided on Apache v2.0 License.

Gitter packagecloud Build Status Coverage Status Code Health

Live demo:

http://ralph-demo.allegro.tech/

  • login: ralph
  • password: ralph

Screenshots

img

img

img

Documentation

Visit our documentation on readthedocs.org

Getting help

ralph's People

Contributors

4i60r avatar andrzej-jankowski avatar ar4s avatar awieckowski avatar blejwi avatar damian1976 avatar dragerus avatar fossilet avatar havelock-vetinari avatar hipek8 avatar jetalone85 avatar jszwaj avatar lukaszkarykowski avatar m1kra avatar maho avatar marekbleschke avatar matyldv avatar mkurek avatar msuszko-vertex avatar nvdacsheets avatar pbromber avatar quamilek avatar rcsheets avatar romcheg avatar russell-io avatar smaciejs avatar szok avatar szymi- avatar vi4m avatar xor-xor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ralph's Issues

Bulk edit got error

Hi guys,
I installed 2.0-rc5 on ubuntu12.04, but Bulk edit function on Venture and Racks screen with nothing select got error screen as;
Not found
The resource you are trying to access cannot be found.
After selected ventures, etc. it works.
Please let me know what's wrong.
Satoru Funai

"Unknown" rack unsupported

Reproduction:

  • Go to Racks.
  • Select "unknown" ffrom the left pane
  • Click on "Rack" or "Add Device" action.

The views try to display "Unknown" as a true Rack object, we get:

AttributeError at /ui/racks//rack/: 'unicode' object has no attribute 'model'

or

AttributeError at /ui/racks//add_device/: 'unicode' object has no attribute 'venture'

respectively.

Problem with starting Ralph

I followed installation manual step-by-step and everything seems to install ok..
Now i can't run Raplh in web browser..i found that there is no wsgi script in:

/home/ralph/lib/python2.7/site-packages/ralph even there is no scripts folder..

I tried to install from pip and from sources..

xlwt is needed

When I ran ralph invetory I got:

Traceback (most recent call last):
  File "/home/ralph/bin/ralph", line 9, in <module>
    load_entry_point('ralph==1.1.18', 'console_scripts', 'ralph')()
  File "/home/ralph/local/lib/python2.7/site-packages/ralph/__main__.py", line 33, in main
    execute_from_command_line(sys.argv)
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/management/commands/report.py", line 16, in <module>
    import xlwt

ssh_linux discovery doesn't take place

On a Linux host the ssh_linux plugin doesn't seem to get triggered:

(ralph)ralph@brian:~ $ ralph discover 127.0.0.1
[ping] 127.0.0.1... up!
[http] 127.0.0.1... Error: timed out
[http_supermicro] 127.0.0.1... no match.
[puppet] 127.0.0.1... not configured
[idrac] 127.0.0.1... not configured
[ssh_cisco_asa] 127.0.0.1... no match:
[ssh_ibm_bladecenter] 127.0.0.1... no match.
[ssh_onstor] 127.0.0.1... no credentials.
[ipmi] 127.0.0.1... not configured
[snmp] 127.0.0.1... port closed.
[hp_oa_xml] 127.0.0.1... no match.
[ssh_proxmox] 127.0.0.1... no match.
[http_ibm_system_x] 127.0.0.1... no credentials.
[ssh_hp_msa] 127.0.0.1... no credentials.
[ssh_ssg] 127.0.0.1... no credentials.
[ssh_aix] 127.0.0.1... no auth.
[ilo_hp] 127.0.0.1... not configured
[plugins_check] 127.0.0.1... http, ping
[position] 127.0.0.1... no device.
[cache_price] 127.0.0.1... no device.
[software] 127.0.0.1... no device.

(ralph)ralph@brian:~$ uname -a
Linux brian 3.2.0-4-amd64 #1 SMP Debian 3.2.39-2 x86_64 GNU/Linux

I've configured the SSH_USER and SSH_PASSWORD in ~/.ralph/settings.

Initial Ralph discovery command fails

I've set up Ralph on Ubuntu 12.04.03 LTS using the documentation. I can access the web front-end and the Python and setcap, back-end web server, and message queue tests run successfully. When I attempt the first ralph discover though I get the following error message:

(ralph)ralph@ralph:~$ ralph discover 127.0.0.1
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==1.2.6', 'console_scripts', 'ralph')()
File "/home/ralph/project/src/ralph/main.py", line 41, in main
execute_from_command_line(sys.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/home/ralph/project/src/ralph/discovery/management/commands/discover.py", line 87, in handle
self._handle(_args, discover=discover, *_options)
File "/home/ralph/project/src/ralph/discovery/management/commands/discover.py", line 130, in _handle
discover.single(addr.ip)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 296, in discover_address
"network.".format(address),
ralph.discovery.tasks.NoQueueError: Address 127.0.0.1 doesn't belong to any configured network.

Anybody know how to solve this? Also, when I try to start the celeryd service the init.d script is unable to find the celery_multi module. Not sure if these two issues are due to the same thing.

Problems with setting up Ralph environment

Hello,

maybe somebody could drop me a few hints, how to correctly configure ralph environment.
I assume, all related services are up, however I can guess, some are not configured as expected (look at msgs from the point 3c/)

Unfortunatelly I'm not a programmer so django framework/python scripts aren't clear enough for me.

  1. Services:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN
[truncated]

a) process list

(ralph)ralph@dcim:~/LOG$ ps ax
PID TTY STAT TIME COMMAND
1 ? Ss 0:01 /sbin/init
2 ? S 0:00 [kthreadd]
3 ? S 0:02 [ksoftirqd/0]
6 ? S 0:00 [migration/0]
7 ? S 0:05 [watchdog/0]
8 ? S< 0:00 [cpuset]
9 ? S< 0:00 [khelper]
10 ? S 0:00 [kdevtmpfs]
11 ? S< 0:00 [netns]
12 ? S 0:03 [sync_supers]
13 ? S 0:00 [bdi-default]
14 ? S< 0:00 [kintegrityd]
15 ? S< 0:00 [kblockd]
16 ? S< 0:00 [ata_sff]
17 ? S 0:00 [khubd]
18 ? S< 0:00 [md]
19 ? S 0:00 [kworker/u:1]
21 ? S 0:00 [khungtaskd]
22 ? S 0:00 [kswapd0]
23 ? SN 0:00 [ksmd]
24 ? SN 0:00 [khugepaged]
25 ? S 0:00 [fsnotify_mark]
26 ? S 0:00 [ecryptfs-kthrea]
27 ? S< 0:00 [crypto]
35 ? S< 0:00 [kthrotld]
37 ? S 0:00 [scsi_eh_0]
38 ? S 0:00 [scsi_eh_1]
39 ? S 0:20 [kworker/u:2]
59 ? S< 0:00 [devfreq_wq]
177 ? S< 0:00 [mpt_poll_0]
180 ? S< 0:00 [mpt/0]
206 ? S 0:00 [scsi_eh_2]
219 ? S< 0:00 [kdmflush]
228 ? S< 0:00 [kdmflush]
241 ? S 0:01 [jbd2/dm-0-8]
242 ? S< 0:00 [ext4-dio-unwrit]
332 ? S 0:00 upstart-udev-bridge --daemon
334 ? Ss 0:00 /sbin/udevd --daemon
411 ? S 0:00 /sbin/udevd --daemon
412 ? S 0:00 /sbin/udevd --daemon
474 ? S< 0:00 [kpsmoused]
540 ? S 0:00 upstart-socket-bridge --daemon
793 ? Ss 0:00 /usr/sbin/sshd -D
801 ? Sl 0:27 rsyslogd -c5
815 ? Ss 0:00 dbus-daemon --system --fork --activation=upstart
863 tty4 Ss+ 0:00 /sbin/getty -8 38400 tty4
868 tty5 Ss+ 0:00 /sbin/getty -8 38400 tty5
878 tty2 Ss+ 0:00 /sbin/getty -8 38400 tty2
879 tty3 Ss+ 0:00 /sbin/getty -8 38400 tty3
882 tty6 Ss+ 0:00 /sbin/getty -8 38400 tty6
885 ? Ss 0:00 acpid -c /etc/acpi/events -s /var/run/acpid.socket
888 ? Ss 0:01 cron
908 ? Ss 0:00 atd
926 ? Ssl 0:00 whoopsie
931 tty1 Ss+ 0:00 /sbin/getty -8 38400 tty1
6808 ? S 0:29 [kworker/0:0]
7908 ? S 0:00 /usr/sbin/apache2 -k start
7909 ? Sl 0:00 /usr/sbin/apache2 -k start
7910 ? Sl 0:00 /usr/sbin/apache2 -k start
8108 ? Ss 0:00 sshd: localadmin [priv]
8291 ? S 0:00 sshd: localadmin@pts/2
8292 pts/2 Ss 0:00 -bash
8390 pts/2 S 0:00 su - ralph
8391 pts/2 S 0:00 -su
8552 ? S 0:00 [flush-252:0]
8654 pts/2 S 0:00 gunicorn: master [gunicorn]
8655 pts/2 S 0:01 [celeryd@dcim:MainProcess] -active- (celeryd -l info)
8677 pts/2 S 0:01 gunicorn: worker [gunicorn]
8692 pts/2 S 0:00 [celeryd@dcim:PoolWorker-1]
8693 pts/2 S 0:00 [celeryd@dcim:PoolWorker-2]
8694 pts/2 S 0:00 [celeryd@dcim:PoolWorker-3]
8695 pts/2 S 0:00 [celeryd@dcim:PoolWorker-4]
8769 ? S 0:00 [kworker/0:2]
8810 ? S 0:00 [kworker/0:1]
8811 pts/2 R+ 0:00 ps ax
17234 ? Ss 6:07 /usr/bin/redis-server /etc/redis/redis.conf
20413 ? Ssl 4:14 /usr/sbin/mysqld
20794 ? Sl 0:34 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1
27993 ? Ss 0:00 SCREEN
27994 pts/0 Ss+ 0:00 /bin/bash
28732 ? Ss 0:34 /usr/sbin/apache2 -k start

  1. I have a batch for Ralph starting:

!/bin/bash

ralph run_gunicorn 2> ~/LOG/gunicorn.log &
ralph celeryd -l info 2> ~/LOG/celery.log &
ralph discover --remote 127.0.0.1 2> ~/LOG/remote.log &

  1. ErrLogs:

a) gunicorn.log
2013-03-08 12:30:18 [8654] [INFO] Starting gunicorn 0.14.6
2013-03-08 12:30:18 [8654] [INFO] Listening at: http://127.0.0.1:8000 (8654)
2013-03-08 12:30:18 [8654] [INFO] Using worker: sync
2013-03-08 12:30:18 [8677] [INFO] Booting worker with pid: 8677
stty: standard input: Inappropriate ioctl for device

b) remote.log
stty: standard input: Inappropriate ioctl for device

c) celery.log
stty: standard input: Inappropriate ioctl for device
[2013-03-08 12:30:19,773: WARNING/MainProcess] celery@dcim ready.
[2013-03-08 12:30:19,789: INFO/MainProcess] consumer: Connected to redis://127.0.0.1:6379/4.
[2013-03-08 12:30:19,796: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[d95cf799-7362-42a8-a30c-8cc6482af372] expires:[2013-03-09 00:30:19.597631+01:00]
[2013-03-08 12:30:19,820: INFO/PoolWorker-4] [ping] 127.0.0.1... up!
[2013-03-08 12:30:19,825: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[bd5f5610-9885-4877-bab8-afd70ea02eaa] expires:[2013-03-09 00:30:19.822151+01:00]
[2013-03-08 12:30:19,832: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[d95cf799-7362-42a8-a30c-8cc6482af372] succeeded in 0.035698890686s: None
[2013-03-08 12:30:20,234: INFO/PoolWorker-3] [http] 127.0.0.1... gunicorn
[2013-03-08 12:30:20,239: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[8c613639-9e35-4d36-bda0-3b2619b55a71] expires:[2013-03-09 00:30:20.236271+01:00]
[2013-03-08 12:30:20,239: DEBUG/PoolWorker-4] no match.
[2013-03-08 12:30:20,241: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[8c613639-9e35-4d36-bda0-3b2619b55a71] succeeded in 0.00203609466553s: None
[2013-03-08 12:30:20,241: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[5aaea63e-38b7-4df4-8a57-ca604f71eaf2] expires:[2013-03-09 00:30:20.240156+01:00]
[2013-03-08 12:30:20,242: DEBUG/PoolWorker-2] not configured
[2013-03-08 12:30:20,246: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[bd5f5610-9885-4877-bab8-afd70ea02eaa] succeeded in 0.42104101181s: None
[2013-03-08 12:30:20,248: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[9c50d8a2-e8e4-4d8f-b206-e2a60a868955] expires:[2013-03-09 00:30:20.244654+01:00]
[2013-03-08 12:30:20,249: DEBUG/PoolWorker-4] not configured
[2013-03-08 12:30:20,251: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[9c50d8a2-e8e4-4d8f-b206-e2a60a868955] succeeded in 0.00215983390808s: None
[2013-03-08 12:30:20,251: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[5aaea63e-38b7-4df4-8a57-ca604f71eaf2] succeeded in 0.00914812088013s: None
[2013-03-08 12:30:20,251: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[8d5ec1b8-fcc1-43da-8a14-cbdc1bb7f1bd] expires:[2013-03-09 00:30:20.249605+01:00]
[2013-03-08 12:30:20,252: DEBUG/PoolWorker-4] no match:
[2013-03-08 12:30:20,253: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[8d5ec1b8-fcc1-43da-8a14-cbdc1bb7f1bd] succeeded in 0.00184893608093s: None
[2013-03-08 12:30:20,254: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[7cc4b120-b753-415f-b020-8ee796647444] expires:[2013-03-09 00:30:20.252318+01:00]
[2013-03-08 12:30:20,254: DEBUG/PoolWorker-4] no match.
[2013-03-08 12:30:20,256: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[7cc4b120-b753-415f-b020-8ee796647444] succeeded in 0.00222301483154s: None
[2013-03-08 12:30:20,256: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[8cf60a47-f177-4179-a602-3d28f0d7c0f0] expires:[2013-03-09 00:30:20.255005+01:00]
[2013-03-08 12:30:20,257: DEBUG/PoolWorker-4] no credentials.
[2013-03-08 12:30:20,258: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[8cf60a47-f177-4179-a602-3d28f0d7c0f0] succeeded in 0.00175499916077s: None
[2013-03-08 12:30:20,259: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[b45c4e37-3013-4959-914e-8376b35f8671] expires:[2013-03-09 00:30:20.257492+01:00]
[2013-03-08 12:30:20,259: DEBUG/PoolWorker-4] not configured
[2013-03-08 12:30:20,261: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[b45c4e37-3013-4959-914e-8376b35f8671] succeeded in 0.00178408622742s: None
[2013-03-08 12:30:20,261: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[9f92b2b4-7771-4d4c-9576-8a1b4d9ffdfb] expires:[2013-03-09 00:30:20.259743+01:00]
[2013-03-08 12:30:20,262: DEBUG/PoolWorker-4] port closed.
[2013-03-08 12:30:20,263: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[9f92b2b4-7771-4d4c-9576-8a1b4d9ffdfb] succeeded in 0.00204491615295s: None
[2013-03-08 12:30:20,264: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[2e3e6a7f-4a76-48b6-a5fd-eed0f7960a4c] expires:[2013-03-09 00:30:20.262304+01:00]
[2013-03-08 12:30:20,264: DEBUG/PoolWorker-4] no match.
[2013-03-08 12:30:20,266: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[2e3e6a7f-4a76-48b6-a5fd-eed0f7960a4c] succeeded in 0.00197601318359s: None
[2013-03-08 12:30:20,266: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[2bcbe29f-7678-4e45-904e-65ef696ebc3e] expires:[2013-03-09 00:30:20.264834+01:00]
[2013-03-08 12:30:20,267: DEBUG/PoolWorker-4] no match.
[2013-03-08 12:30:20,268: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[2bcbe29f-7678-4e45-904e-65ef696ebc3e] succeeded in 0.00194191932678s: None
[2013-03-08 12:30:20,269: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[188e163a-0e73-424f-acb6-98030879d6e9] expires:[2013-03-09 00:30:20.267339+01:00]
[2013-03-08 12:30:20,269: DEBUG/PoolWorker-4] no credentials.
[2013-03-08 12:30:20,271: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[188e163a-0e73-424f-acb6-98030879d6e9] succeeded in 0.00205516815186s: None
[2013-03-08 12:30:20,271: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[c880a6b4-169c-4e54-a969-6578cdc18664] expires:[2013-03-09 00:30:20.270009+01:00]
[2013-03-08 12:30:20,272: DEBUG/PoolWorker-4] no credentials.
[2013-03-08 12:30:20,274: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[c880a6b4-169c-4e54-a969-6578cdc18664] succeeded in 0.00186395645142s: None
[2013-03-08 12:30:20,274: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[da8dcaae-5435-48c6-aa6e-809c3417e6b2] expires:[2013-03-09 00:30:20.272630+01:00]
[2013-03-08 12:30:20,274: DEBUG/PoolWorker-4] no match.
[2013-03-08 12:30:20,276: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[da8dcaae-5435-48c6-aa6e-809c3417e6b2] succeeded in 0.00183582305908s: None
[2013-03-08 12:30:20,276: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[d28d9635-125d-4cb9-a759-463909a43f34] expires:[2013-03-09 00:30:20.275052+01:00]
[2013-03-08 12:30:20,277: DEBUG/PoolWorker-4] no auth.
[2013-03-08 12:30:20,278: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[d28d9635-125d-4cb9-a759-463909a43f34] succeeded in 0.00180602073669s: None
[2013-03-08 12:30:20,279: INFO/MainProcess] Got task from broker: ralph.discovery.tasks.discover_single[d1586b58-a936-4164-8076-a9c5c6d7f52c] expires:[2013-03-09 00:30:20.277425+01:00]
[2013-03-08 12:30:20,279: DEBUG/PoolWorker-4] not configured
[2013-03-08 12:30:20,281: INFO/PoolWorker-4] [plugins_check] 127.0.0.1... http, ping
[2013-03-08 12:30:20,282: DEBUG/PoolWorker-4] no device.
[2013-03-08 12:30:20,284: DEBUG/PoolWorker-4] no device.
[2013-03-08 12:30:20,285: DEBUG/PoolWorker-4] no device.
[2013-03-08 12:30:20,285: INFO/MainProcess] Task ralph.discovery.tasks.discover_single[d1586b58-a936-4164-8076-a9c5c6d7f52c] succeeded in 0.00652289390564s: None

  1. RALPH tests failed

(ralph)ralph@dcim:~$ ralph test ralph.util
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==1.1.16', 'console_scripts', 'ralph')()
File "/home/ralph/local/lib/python2.7/site-packages/ralph/main.py", line 33, in main
execute_from_command_line(sys.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 49, in run_from_argv
super(Command, self).run_from_argv(argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/home/ralph/local/lib/python2.7/site-packages/south/management/commands/test.py", line 8, in handle
super(Command, self).handle(_args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 72, in handle
failures = test_runner.run_tests(test_labels)
File "/home/ralph/local/lib/python2.7/site-packages/django/test/simple.py", line 380, in run_tests
suite = self.build_suite(test_labels, extra_tests)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/util/init.py", line 72, in build_suite
top_level_dir=settings.CURRENT_DIR,
File "/home/ralph/local/lib/python2.7/site-packages/django/utils/unittest/loader.py", line 224, in discover
tests = list(self._find_tests(start_dir, pattern))
File "/home/ralph/local/lib/python2.7/site-packages/django/utils/unittest/loader.py", line 258, in _find_tests
name = self._get_name_from_path(full_path)
File "/home/ralph/local/lib/python2.7/site-packages/django/utils/unittest/loader.py", line 232, in _get_name_from_path
assert not _relpath.startswith('..'), "Path must be within the project"
AssertionError: Path must be within the project

  1. Tree (for Python env)

(ralph)ralph@dcim:$ id
uid=1001(ralph) gid=1001(ralph) groups=1001(ralph)
(ralph)ralph@dcim:
$ tree -dlA 3
3 [error opening dir]

0 directories
(ralph)ralph@dcim:~$ tree -dAL 3
.
โ”œโ”€โ”€ bin
โ”œโ”€โ”€ include
โ”‚ โ””โ”€โ”€ python2.7 -> /usr/include/python2.7
โ”œโ”€โ”€ lib
โ”‚ โ””โ”€โ”€ python2.7
โ”‚ โ”œโ”€โ”€ config -> /usr/lib/python2.7/config
โ”‚ โ”œโ”€โ”€ distutils
โ”‚ โ”œโ”€โ”€ encodings -> /usr/lib/python2.7/encodings
โ”‚ โ”œโ”€โ”€ lib-dynload -> /usr/lib/python2.7/lib-dynload
โ”‚ โ””โ”€โ”€ site-packages
โ”œโ”€โ”€ local
โ”‚ โ”œโ”€โ”€ bin -> /home/ralph/bin
โ”‚ โ”œโ”€โ”€ include -> /home/ralph/include
โ”‚ โ””โ”€โ”€ lib -> /home/ralph/lib
โ”œโ”€โ”€ LOG
โ”œโ”€โ”€ man
โ”‚ โ””โ”€โ”€ man1
โ”œโ”€โ”€ restkit
โ””โ”€โ”€ socketpool

19 directories

I can log in to the Ralph web panel (but no CSS/graphics content is visible).
What scripts should I check, what should be corrected..?

Regards,
Krzysztof

Can not access file error

Hi
I don't know if I can ask my quiestion here or not. I have installed ralph but every daemon I start or every discovery I want to do has Error opening file for reading: Permission denied error. the web interface already works but I can not discover my network I am not sure if it works correctly. for example I did this discovery and had the following result:

ralph)ralph@Ralph:~/bin$ ralph discover '10.0.5.0/24'
Error opening file for reading: Permission denied
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==1.0.2', 'console_scripts', 'ralph')()
File "/home/ralph/project/src/ralph/main.py", line 11, in main
execute_from_command_line(sys.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/home/ralph/project/src/ralph/discovery/management/commands/discover.py", line 78, in handle
self._handle(_args, discover=discover, *_options)
File "/home/ralph/project/src/ralph/discovery/management/commands/discover.py", line 119, in _handle
discover.network(addr)
File "/home/ralph/local/lib/python2.7/site-packages/celery/app/task.py", line 315, in call
return self.run(_args, *_kwargs)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 260, in discover_network
dbnet = Network.objects.get(address=str(network))
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/manager.py", line 131, in get
return self.get_query_set().get(_args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 366, in get
% self.model._meta.object_name)
ralph.discovery.models_network.DoesNotExist: Network matching query does not exist.

would you please give me clue about what is happening?

IPMI discover error

Exception in plugin 'ipmi' for '172.16.2.5'.
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==2.0.0-rc2', 'console_scripts', 'ralph')()
File "/home/ralph/project/src/ralph/main.py", line 41, in main
execute_from_command_line(sys.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/home/ralph/project/src/ralph/discovery/management/commands/discover.py", line 104, in handle
self._handle(_args, discover=discover, *_options)
File "/home/ralph/project/src/ralph/discovery/management/commands/discover.py", line 173, in _handle
discover.single(addr.ip)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 311, in discover_address
interactive=interactive,
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 126, in run_next_plugin
interactive, done_requirements, outputs)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 185, in run_plugin
done_requirements, outputs)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 126, in run_next_plugin
interactive, done_requirements, outputs)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 185, in run_plugin
done_requirements, outputs)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 126, in run_next_plugin
interactive, done_requirements, outputs)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 163, in run_plugin
done_requirements, outputs)
File "/home/ralph/project/src/ralph/discovery/tasks.py", line 201, in _run_plugin
**context)
File "/home/ralph/project/src/ralph/util/plugin.py", line 84, in run
return BY_NAME[chain]func_name
File "/home/ralph/project/src/ralph/discovery/plugins/ipmi.py", line 254, in ipmi
name = _run_ipmi(ip)
File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/init.py", line 230, in _nested_commit_on_success
return _commit_on_success(_args,__kwds)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/transaction.py", line 224, in inner
return func(_args, *_kwargs)
File "/home/ralph/project/src/ralph/discovery/plugins/ipmi.py", line 228, in _run_ipmi
sn=sn, model_name=name.title(), model_type=model_type)
File "/home/ralph/project/src/ralph/discovery/models_device.py", line 600, in create
dev.save(user=user, update_last_seen=True, priority=priority)
File "/home/ralph/project/src/ralph/discovery/models_device.py", line 776, in save
return super(Device, self).save(_args, *_kwargs)
File "/home/ralph/project/src/ralph/discovery/models_util.py", line 27, in save
super(LastSeen, self).save(_args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/models.py", line 370, in save
super(SavePrioritized, self).save(_args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/models.py", line 201, in save
super(TimeTrackable, self).save(_args, *_kwargs)
File "/home/ralph/project/src/ralph/discovery/models_util.py", line 36, in save
return super(SavingUser, self).save(_args, **kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/monkeys.py", line 44, in
using)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 529, in save_base
rows = manager.using(using).filter(pk=pk_val)._update(values)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 560, in _update
return query.get_compiler(self.db).execute_sql(None)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 988, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 808, in execute_sql
sql, params = self.as_sql()
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 965, in as_sql
sql, params = val.as_sql(qn, self.connection)
ValueError: need more than 0 values to unpack

www.allegro.pl is not pingable

Hi,

After i've created the first network setup in Ralph, I'd like to try some discovery. However, after running

ralph discover '127.0.0.1/24'

I get the following output:

Traceback (most recent call last):
  File "/usr/local/bin/ralph", line 9, in <module>
    load_entry_point('ralph==1.2.9', 'console_scripts', 'ralph')()
  File "/usr/local/lib/python2.7/site-packages/ralph/__main__.py", line 41, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/site-packages/ralph/discovery/management/commands/discover.py", line 87, in handle
    self._handle(*args, discover=discover, **options)
  File "/usr/local/lib/python2.7/site-packages/ralph/discovery/management/commands/discover.py", line 128, in _handle
    discover.network(addr)
  File "/usr/local/lib/python2.7/site-packages/ralph/discovery/tasks.py", line 321, in discover_network
    sanity_check()
  File "/usr/local/lib/python2.7/site-packages/ralph/discovery/tasks.py", line 79, in sanity_check
    ).strip().format(SANITY_CHECK_PING_ADDRESS),
django.core.exceptions.ImproperlyConfigured: fatal: www.allegro.pl is not pingable.

How can i disable this wonderful ping of your domain? My dev server for ralph (and production if it comes) will not have access to internet.

Manually adding incidents/problems (CMDB)

How do I add an incident/problem to a CI manually, i.e. from web interface? I created a venture, added a CI, but I can't find how to manually create an incident/problem.

If that's impossible currently, how would I implement it in code?

Can't "View on site" a CI

Ralph 2.0.0-rc1, MySQL backend, installed strictly by the manual.

I created a CI and in the admin panel (admin/cmdb/ci/2/) I click "View on site" (/admin/r/45/2/), and it throws me:

500.
That's an error.
You should probably ask someone maintaining this Ralph instance to check the logs and report a bug. Thanks for your patience.

I tried to change all the parameters like "Layers containing given CI", "Content type", "State", "Status", "Type" โ€” same error.

The project/src/ralph/runtime.log reads:

04:15:22,541 ERROR   [MainProcess 8340] base - Internal Server Error: /admin/r/45/1/
Traceback (most recent call last):
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 213, in wrapper
    return self.admin_view(view, cacheable)(*args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 196, in inner
    return view(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/contenttypes/views.py", line 27, in shortcut
    absurl = get_absolute_url()
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/functional.py", line 11, in _curried
    return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 883, in get_absolute_url
    return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/__init__.py", line 35, in inner
    return reverse(bits[0], None, *bits[1:3])
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 476, in reverse
    return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
TypeError: _reverse_with_prefix() argument after ** must be a mapping, not unicode

no such function: MONTH

DatabaseError at /cmdb/changes/dashboard

Environment:

Request Method: GET
Request URL: http://10.13.37.21:8000/cmdb/changes/dashboard

Django Version: 1.4
Python Version: 2.7.3
Installed Applications:
[u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.sites',
u'django.contrib.messages',
u'django.contrib.staticfiles',
u'django.contrib.admin',
u'djcelery',
u'south',
u'lck.django.common',
u'lck.django.activitylog',
u'lck.django.profile',
u'lck.django.score',
u'lck.django.tags',
u'gunicorn',
u'fugue_icons',
u'bob',
u'tastypie',
u'ralph.account',
u'ralph.business',
u'ralph.cmdb',
u'ralph.discovery',
u'ralph.integration',
u'ralph.ui',
u'ralph.dnsedit',
u'ralph.util',
u'ajax_select',
u'powerdns']
Installed Middleware:
(u'django.middleware.gzip.GZipMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.contrib.sessions.middleware.SessionMiddleware',
u'lck.django.common.middleware.TimingMiddleware',
u'django.middleware.locale.LocaleMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'django.contrib.auth.middleware.AuthenticationMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'lck.django.activitylog.middleware.ActivityMiddleware',
u'lck.django.common.middleware.ForceLanguageCodeMiddleware')

Traceback:
File "/home/ralph/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/home/ralph/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  2.             return view_func(request, _args, *_kwargs)
    
    File "/home/ralph/lib/python2.7/site-packages/django/views/generic/base.py" in view
  3.         return self.dispatch(request, _args, *_kwargs)
    
    File "/home/ralph/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  4.     return handler(request, _args, *_kwargs)
    
    File "/home/ralph/project/src/ralph/cmdb/views_changes.py" in get
  5.     ''')
    
    File "/home/ralph/lib/python2.7/site-packages/django/db/backends/util.py" in execute
  6.         return self.cursor.execute(sql, params)
    
    File "/home/ralph/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py" in execute
  7.         return Database.Cursor.execute(self, query, params)
    

Exception Type: DatabaseError at /cmdb/changes/dashboard
Exception Value: no such function: MONTH

Ralph test fails

I've installed ralph with default database MySQL and it fails on test. Command raplh test util doesn't work and I get

ralph test util
Traceback (most recent call last):
  File "/home/ralph/bin/ralph", line 9, in <module>
    load_entry_point('ralph==1.1.15', 'console_scripts', 'ralph')()
  File "/home/ralph/local/lib/python2.7/site-packages/ralph/__main__.py", line 33, in main
    execute_from_command_line(sys.argv)
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 49, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/home/ralph/local/lib/python2.7/site-packages/south/management/commands/test.py", line 8, in handle
    super(Command, self).handle(*args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 72, in handle
    failures = test_runner.run_tests(test_labels)
  File "/home/ralph/local/lib/python2.7/site-packages/django/test/simple.py", line 380, in run_tests
    suite = self.build_suite(test_labels, extra_tests)
  File "/home/ralph/local/lib/python2.7/site-packages/ralph/util/__init__.py", line 64, in build_suite
    suite = defaultTestLoader.loadTestsFromNames(test_labels)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/unittest/loader.py", line 148, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/unittest/loader.py", line 111, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
ImportError: No module named util

When i try ralph test I get

Creating test database for alias 'default'...
.ss...........F/home/ralph/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py:114: Warning: Data truncated for column 'hosts_naming_template' at row 1
  return self.cursor.execute(query, args)
...............No handlers could be found for logger "ralph.cmdb.models_signals"
.................................................F..F..F.......EFF..
======================================================================
ERROR: test_get_new_issues (cmdb.tests.JiraRssTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ralph/lib/python2.7/site-packages/ralph/cmdb/tests.py", line 446, in test_get_new_issues
    sorted(x.get_new_issues()), [
  File "/home/ralph/local/lib/python2.7/site-packages/ralph/cmdb/integration/issuetracker_plugins/jira.py", line 69, in get_new_issues
    return self.get_issues()
  File "/home/ralph/local/lib/python2.7/site-packages/ralph/cmdb/integration/issuetracker_plugins/jira.py", line 49, in get_issues
    for issue in issues:
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 118, in _result_iter
    self._fill_cache()
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 892, in _fill_cache
    self._result_cache.append(self._iter.next())
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 291, in iterator
    for row in compiler.results_iter():
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 763, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 818, in execute_sql
    cursor.execute(sql, params)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 114, in execute
    return self.cursor.execute(query, args)
  File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
DatabaseError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key) ORDER BY NULL' at line 1")

======================================================================
FAIL: test_archivization (deployment.tests.test_deployment.DeploymentTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ralph/lib/python2.7/site-packages/ralph/deployment/tests/test_deployment.py", line 98, in test_archivization
    self.assertEqual(data, archive_data)
AssertionError: {'status': 1, 'mass_deployment': None, 'status_lastchanged': datetime.datetime(2 [truncated]... != {'status': 1L, 'mass_deployment': None, 'status_lastchanged': datetime.datetime( [truncated]...
Diff is 997 characters long. Set self.maxDiff to None to see it.

======================================================================
FAIL: test_add_two_ci_with_the_same_content_object (cmdb.tests.CIFormsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ralph/lib/python2.7/site-packages/ralph/cmdb/tests.py", line 722, in test_add_two_ci_with_the_same_content_object
    unicode(e.exception),
AssertionError: u'columns content_type_id, object_id are not unique' != u'(1062, "Duplicate entry \'80-81\' for key \'cmdb_ci_content_type_id_304150d6b4 [truncated]...
- columns content_type_id, object_id are not unique
+ (1062, "Duplicate entry '80-81' for key 'cmdb_ci_content_type_id_304150d6b4a7c3f3_uniq'")


======================================================================
FAIL: test_ci_relations_cycle (cmdb.tests.CIFormsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ralph/lib/python2.7/site-packages/ralph/cmdb/tests.py", line 902, in test_ci_relations_cycle
    self.assertEqual(cycle, [1, 2, 3])
AssertionError: Lists differ: [77L, 78L, 79L] != [1, 2, 3]

First differing element 0:
77
1

- [77L, 78L, 79L]
+ [1, 2, 3]

======================================================================
FAIL: test_import_devices (cmdb.tests.CIImporterTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ralph/lib/python2.7/site-packages/ralph/cmdb/tests.py", line 296, in test_import_devices
    ({1: None, 2: 1, 4: 7, 6: 2, 7: 2}, [1, 2, 6, 7, 4])
AssertionError: [] != ({1: None, 2: 1, 4: 7, 6: 2, 7: 2}, [1, 2, 6, 7, 4])

======================================================================
FAIL: test_create_ci_generate_change (cmdb.tests.OPRegisterTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ralph/local/lib/python2.7/site-packages/mock.py", line 1224, in patched
    return func(*args, **keywargs)
  File "/home/ralph/lib/python2.7/site-packages/ralph/cmdb/tests.py", line 525, in test_create_ci_generate_change
    CI_CHANGE_REGISTRATION_TYPES.NOT_REGISTERED.id)])
AssertionError: Items in the first set but not the second:
(u'None', u'114', u'id', None, 4L)
Items in the second set but not the first:
(u'None', u'1', u'id', None, 4)

======================================================================
FAIL: test_create_ci_register_change (cmdb.tests.OPRegisterTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ralph/local/lib/python2.7/site-packages/mock.py", line 1224, in patched
    return func(*args, **keywargs)
  File "/home/ralph/lib/python2.7/site-packages/ralph/cmdb/tests.py", line 570, in test_create_ci_register_change
    CI_CHANGE_REGISTRATION_TYPES.NOT_REGISTERED.id)])
AssertionError: Items in the first set but not the second:
(u'None', u'115', u'id', None, 4L)
Items in the second set but not the first:
(u'None', u'1', u'id', None, 4)

----------------------------------------------------------------------
Ran 98 tests in 63.591s

FAILED (failures=6, errors=1, skipped=2)
Destroying test database for alias 'default'...

How to add a rack?

Hello!

First of all Thanks for so cool asset management system! :)

But I've one problem with it, due to lack of documentation. I can't find any info about how to add rack in "admin" panel so that it show at ui/racks/.
I tried next:

  1. Add 'device model' named '42U Rack' with type 'rack'
  2. Add 'device' named 'Rack C14-1' with appropriate 'device model' and save it.

But it's nothing show ui/racks/

Please help!

BTW, I don't understand why i can select device type 'data center' in 'device model', if i can add DC on 'Data centers' admin page and then it's not show in device list. Could you slightly explain why it's made so?

Connection Map feature

Can we track connections between devices/patchpanels/ports etc. and also export connection maps into pdf file or other format ??

profile matching query does not exist

I follow the link below, step by step to complete the installation and configuration.
http://ralph.allegrogroup.com/doc/installation.html

My question:

  1. only login , show the 500 error.
    2.When I open the debug mode, see this error:

"DoesNotExist at /
Profile matching query does not exist.
Request Method: GET
Request URL: http://172.168.12.138:8080/
Django Version: 1.4.5
Exception Type: DoesNotExist
Exception Value:
Profile matching query does not exist.
Exception Location: /home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py in get, line 366
Python Executable: /home/ralph/bin/python
Python Version: 2.7.3
Python Path:
['/home/ralph/bin',
'/home/ralph/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg',
'/home/ralph/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg',
'/home/ralph/project/src',
'/home/ralph/lib/python2.7',
'/home/ralph/lib/python2.7/plat-linux2',
'/home/ralph/lib/python2.7/lib-tk',
'/home/ralph/lib/python2.7/lib-old',
'/home/ralph/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/home/ralph/local/lib/python2.7/site-packages'] "

3.just use "pip install ralph" to complete the installation and configuration, i will not found "project" directory when i run the "ralph test ralph.util" and " ralph run_gunicorn" command.
4.just use "git clone git://github.com/allegro/ralph.git project" to complete the installation and configuration, we will find error:"lib/python2.7/site-packages/ralph๏ผš not found"
5.I can't find where can I see the log,

Software environment๏ผš
OS:ubuntu 12.04

ralph develop: relation "dnsedit_dnsserver" does not exist

Branch ralph develop. After getting new changes and running migrate I get an error:

Running migrations for discovery:

  • Migrating forwards to 0024_auto__add_field_network_dhcp_broadcast__add_field_datacenter_domain.

    discovery:0024_auto__add_field_network_dhcp_broadcast__add_field_datacenter_domain
    FATAL ERROR - The following SQL query failed: ALTER TABLE "discovery_network_custom_dns_servers" ADD CONSTRAINT "dnsserver_id_refs_id_49838ac759d10b48" FOREIGN KEY ("dnsserver_id") REFERENCES "dnsedit_dnsserver" ("id") DEFERRABLE INITIALLY DEFERRED;
    The error was: relation "dnsedit_dnsserver" does not exist

Error in migration: discovery:0024_auto__add_field_network_dhcp_broadcast__add_field_datacenter_domain
Traceback (most recent call last):
File "/data/env/ralph/bin/ralph", line 9, in
load_entry_point('ralph==2.0.0-rc1', 'console_scripts', 'ralph')()
File "/data/env/ralph/lib/python2.7/site-packages/ralph/main.py", line 41, in main
execute_from_command_line(sys.argv)
File "/data/env/ralph/lib/python2.7/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/data/env/ralph/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/data/env/ralph/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/data/env/ralph/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/data/env/ralph/lib/python2.7/site-packages/south/management/commands/migrate.py", line 108, in handle
ignore_ghosts = ignore_ghosts,
File "/data/env/ralph/lib/python2.7/site-packages/south/migration/init.py", line 213, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/data/env/ralph/lib/python2.7/site-packages/south/migration/migrators.py", line 235, in migrate_many
result = migrator.class.migrate_many(migrator, target, migrations, database)
File "/data/env/ralph/lib/python2.7/site-packages/south/migration/migrators.py", line 310, in migrate_many
result = self.migrate(migration, database)
File "/data/env/ralph/lib/python2.7/site-packages/south/migration/migrators.py", line 133, in migrate
result = self.run(migration)
File "/data/env/ralph/lib/python2.7/site-packages/south/migration/migrators.py", line 107, in run
return self.run_migration(migration)
File "/data/env/ralph/lib/python2.7/site-packages/south/migration/migrators.py", line 82, in run_migration
south.db.db.execute_deferred_sql()
File "/data/env/ralph/lib/python2.7/site-packages/south/db/generic.py", line 309, in execute_deferred_sql
self.execute(sql)
File "/data/env/ralph/lib/python2.7/site-packages/south/db/generic.py", line 273, in execute
cursor.execute(sql, params)
File "/data/env/ralph/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
return self.cursor.execute(sql, params)
File "/data/env/ralph/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
return self.cursor.execute(query, args)
django.db.utils.DatabaseError: relation "dnsedit_dnsserver" does not exist

Cannot add user through Admin interface

When trying to add a user through Admin > Users > Add User and filling in the form on submit the following happens:

500.
That's an error.

You should probably ask someone maintaining this Ralph instance to check the logs and report a bug. Thanks for your patience.

The traceback:

13:00:41,726 ERROR   [MainProcess 20628] base - Internal Server Error: /admin/auth/user/add/
Traceback (most recent call last):
  File "/home/ralph/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 366, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 196, in inner
    return view(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/views/decorators/debug.py", line 69, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in _wrapper
    return bound_func(*args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py", line 21, in bound_func
    return func(self, *args2, **kwargs2)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/transaction.py", line 209, in inner
    return func(*args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/auth/admin.py", line 114, in add_view
    extra_context)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py", line 25, in _wrapper
    return bound_func(*args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py", line 21, in bound_func
    return func(self, *args2, **kwargs2)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/transaction.py", line 209, in inner
    return func(*args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 956, in add_view
    self.save_related(request, form, formsets, False)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 733, in save_related
    self.save_formset(request, form, formset, change=change)
  File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 721, in save_formset
    formset.save()
  File "/home/ralph/local/lib/python2.7/site-packages/django/forms/models.py", line 497, in save
    return self.save_existing_objects(commit) + self.save_new_objects(commit)
  File "/home/ralph/local/lib/python2.7/site-packages/django/forms/models.py", line 628, in save_new_objects
    self.new_objects.append(self.save_new(form, commit=commit))
  File "/home/ralph/local/lib/python2.7/site-packages/django/forms/models.py", line 731, in save_new
    obj.save()
  File "/home/ralph/local/lib/python2.7/site-packages/lck/django/profile/models.py", line 95, in save
    super(BasicInfo, self).save(*args, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/monkeys.py", line 44, in <lambda>
    using)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 551, in save_base
    result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/manager.py", line 203, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 1593, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 910, in execute_sql
    cursor.execute(sql, params)
  File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 344, in execute
    return Database.Cursor.execute(self, query, params)
IntegrityError: column user_id is not unique

Apache2 proxy and ralph

Hi
I install ralph on server using official documentation publishend on site, for bug witch dnspython I found dirty workaround ( -f flag and URL).

But in Webrowser may installation is missing CSS and Images - command "ralph collectstatic" didn't solve this problem (inform only copy xxxx objects). I check Instalation and spoted that directory /home/ralph/lib/python2.7/site-packages/ralph/static/ dosent exist.

Do you have any suggestion ?

ralph in browser - howto?

i've installed Ralph but i don't know how i can test it in the browser. virtual machine with ubuntu server 12.04 has public IP address and when i connect to it displays "It works! This is the default web page for this server.". how can i connect to Ralph?

ssh authorization issue on Linux

I am trying to configure ssh discovery without much luck.

I have set ssh_user and ssh_password, and the ssh attempts to login, but fails authorization.

The sshd output says this:

Did not receive identification string from <ipaddress>

ralph syncdb fails on Ubuntu 12.04 LTS Server

Just wanted to give Ralph a try and installed fresh Ubuntu 12.04 LTS Server and then followed your installation instructions. Tried both pip and source one and both ways it fails on syncdb with following error:

(ralph)ralph@ralph:~$ ralph syncdb
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==1.0.1', 'console_scripts', 'ralph')()
File "/home/ralph/local/lib/python2.7/site-packages/ralph/main.py", line 11, in main
execute_from_command_line(sys.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 231, in execute
self.validate()
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 266, in validate
num_errors = get_validation_errors(s, app)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/validation.py", line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/loading.py", line 158, in get_app_errors
self._populate()
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/loading.py", line 64, in _populate
self.load_app(app_name, True)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/loading.py", line 88, in load_app
models = import_module('.models', app_name)
File "/home/ralph/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/account/models.py", line 161, in
for u in User.objects.order_by('id'):
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 118, in _result_iter
self._fill_cache()
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 875, in _fill_cache
self._result_cache.append(self._iter.next())
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 291, in iterator
for row in compiler.results_iter():
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 763, in results_iter
for rows in self.execute_sql(MULTI):
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 817, in execute_sql
cursor = self.connection.cursor()
File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/init.py", line 306, in cursor
cursor = self.make_debug_cursor(self._cursor())
File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 387, in _cursor
self.connection = Database.connect(**kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/init.py", line 81, in Connect
return Connection(_args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 187, in init
super(Connection, self).init(_args, *_kwargs2)
TypeError: keywords must be strings

Not sure if its Ubuntu related or Ralph related problem. Just letting you know.

Should "discover" fill database?

I discovered a network but seems like the database is not filled with the "UP" ip addresses ralph just discovered. I haven't entered any ip addresses in the database before, actually my database is clean. should "discover' fill the database automatically? If so, what is possibly my problem that it is not filled?

JIRA integration troubles with ci_id field fill in

In ralph settings file, ISSUETRACKERS sections is set as follows:

'ENGINE' : 'JIRA',
'USER' : 'user_name',
'PASSWORD' : 'password',
'URL' : 'http;//localhost:8080',
'CI_FIELD_NAME' : '10001',
'CI_NAME_FIELD_NAME' : 'ralph',
it is relation to custom field defined in jira tool, table CUSTOMFIELDS (JIRA)
'CMDB_PROJECT' : '10002',
it is relation to JIRA project called 'Change Manegement'
'CMDB_VIEW_CHANGELINK' : 'http://localhost:8080/%s',
given below section is almost new and not described in the documentation unfortunately
'CHANGES' : {
'ISSUETYPE' : '1',
}
'PROBLEMS' : {
'ISSUETYPE' : '3',
}
'INCIDENTS' : {
'ISSUETYPE' : '2',
}
all of them are in compliance with the data checked in the table ISSUTYPE (JIRA)

After the prompt command $ ralph cmdb_integration --cmdb_jira (not --jira) data are imported to CMDB however the ci_id (relation to CIs in CMDB) is still empty.

Is there any possibility to connect during the import any changes, incidents or problems to CIs defined in CMDB when given custom field in JIRA consist of the existing CI id (e.g. mm-2)

BTW:
Jira version used for proof of concept was 6.1.

ralph testing fails

i've install ralph with default options for databases (sqlite) and it fails every single test from installation guide

ralph test util
Error opening file for reading: Permission denied
(...)
FATAL ERROR - the following SQL query failed (...)
table "celery_taskmeta" already exsists

ralph run_gunicorn
(...)
Error opening file for reading: Permission denied

ralph celeryd -l info
Error opening file for reading: Permission denied
(...)
ImportError: No module named redis

ralph discover 127.0.0.1
Error opening file for reading: Permission denied
(...)
DatabaseError: no such table: discovery_network

where i can check properties of database if i will decide to use MySQL?

Discover Error : IndexError: list index out of range

(ralph)ralph@ubuntu01:$ ralph discover 127.0.0.1
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==1.2.2', 'console_scripts', 'ralph')()
File "/home/ralph/project/src/ralph/main.py", line 44, in main
raise e
IndexError: list index out of range
(ralph)ralph@ubuntu01:
$ sudo setcap cap_net_raw=ep /home/ralph/bin/python
(ralph)ralph@ubuntu01:~$ ralph discover --remote 127.0.0.1
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==1.2.2', 'console_scripts', 'ralph')()
File "/home/ralph/project/src/ralph/main.py", line 44, in main
raise e
IndexError: list index out of range

Broken link in installation.rst

The link at the end of the Redis section in the generated HTML files (on the live site and on my machine) points to configuration.rst#message-queue-broker instead of the proper file on the webserver.
Couldn't find any working solution for that, so no patch this time :(

Ralph demo site

Maybe demo site with ralph installation will be a good idea? Not everyone will install ralph just only for tests, because it costs some time

Error running syncdb on postgresql

$ ralph syncdb
Syncing...
Traceback (most recent call last):
  File "/home/ralph/bin/ralph", line 9, in 
    load_entry_point('ralph==1.1.7', 'console_scripts', 'ralph')()
  File "/home/ralph/lib/python2.7/site-packages/ralph/__main__.py", line 28, in main
    execute_from_command_line(sys.argv)
  File "/home/ralph/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/home/ralph/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ralph/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/ralph/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/home/ralph/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/home/ralph/lib/python2.7/site-packages/south/management/commands/syncdb.py", line 90, in handle_noargs
    syncdb.Command().execute(**options)
  File "/home/ralph/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/home/ralph/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "/home/ralph/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 60, in handle_noargs
    tables = connection.introspection.table_names()
  File "/home/ralph/lib/python2.7/site-packages/django/db/backends/__init__.py", line 904, in table_names
    return self.get_table_list(cursor)
  File "/home/ralph/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/introspection.py", line 33, in get_table_list
    AND pg_catalog.pg_table_is_visible(c.oid)""")
  File "/home/ralph/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
    return self.cursor.execute(sql, params)
  File "/home/ralph/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 52, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: current transaction is aborted, commands ignored until end of transaction block
Nov 15 15:21:26 db-admin-1 postgres[49613]: [4-1] ERROR:  relation "auth_user" does not exist at character 280
Nov 15 15:21:26 db-admin-1 postgres[49613]: [4-2] STATEMENT:  SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined" FROM "auth_user" ORDER BY "auth_user"."id" ASC
Nov 15 15:21:26 db-admin-1 postgres[49613]: [5-1] ERROR:  current transaction is aborted, commands ignored until end of transaction block
Nov 15 15:21:26 db-admin-1 postgres[49613]: [5-2] STATEMENT:
Nov 15 15:21:26 db-admin-1 postgres[49613]: [5-3]                   SELECT c.relname
Nov 15 15:21:26 db-admin-1 postgres[49613]: [5-4]                   FROM pg_catalog.pg_class c
Nov 15 15:21:26 db-admin-1 postgres[49613]: [5-5]                   LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
Nov 15 15:21:26 db-admin-1 postgres[49613]: [5-6]                   WHERE c.relkind IN ('r', 'v', '')
Nov 15 15:21:26 db-admin-1 postgres[49613]: [5-7]                       AND n.nspname NOT IN ('pg_catalog', 'pg_toast')
Nov 15 15:21:26 db-admin-1 postgres[49613]: [5-8]                       AND pg_catalog.pg_table_is_visible(c.oid)

Discovery plugins, that can be run only explicitly

Requesting a way to declare a plugin as "explicit only". "Explicit only" discovery plugins could only be run by the --plugin parameter or if device model matches.

Use case:
A discovery plugin that is potentially dangerous to devices from another manufacturer.

Edit:
Alternatively implementing a parameter that allows to ignore plugin requirements would also solve the problem.

Missing a migration in master? Exception Value: (1054, "Unknown column 'discovery_devicemodelgroup.created' in 'field list'")

Environment:

Request Method: GET
Request URL: http://192.168.122.50:8080/ui/search/info/

Django Version: 1.4.1
Python Version: 2.7.3
Installed Applications:
[u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.sites',
u'django.contrib.messages',
u'django.contrib.staticfiles',
u'django.contrib.admin',
u'djcelery',
u'south',
u'lck.django.common',
u'lck.django.activitylog',
u'lck.django.profile',
u'lck.django.score',
u'lck.django.tags',
u'gunicorn',
u'fugue_icons',
u'bob',
u'tastypie',
u'ralph.account',
u'ralph.business',
u'ralph.cmdb',
u'ralph.discovery',
u'ralph.deployment',
u'ralph.integration',
u'ralph.ui',
u'ralph.dnsedit',
u'ralph.util',
u'ralph.deployment',
u'ajax_select',
u'powerdns']
Installed Middleware:
(u'django.middleware.gzip.GZipMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.contrib.sessions.middleware.SessionMiddleware',
u'lck.django.common.middleware.TimingMiddleware',
u'django.middleware.locale.LocaleMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'django.contrib.auth.middleware.AuthenticationMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'lck.django.activitylog.middleware.ActivityMiddleware',
u'lck.django.common.middleware.ForceLanguageCodeMiddleware')

Template error:
In template /home/ralph/project/src/ralph/ui/templates/ui/base-devices.html, error at line 18
1054
8 : {% if sidebar_items %}

9 : {% sidebar_menu sidebar_items sidebar_selected %}

10 : {% endif %}

11 :

12 : {% if searchform %}

13 : <form class="form search-form well well-small"

14 : {% if not searchform_filter %}action="{% url 'search' details '' %}"{% endif %} >

15 : {% for f in searchform %}

16 :

17 : {{ f.label_tag }}

18 : {{ f }}

19 : {% for e in f.errors %}

20 :

{{ e }}

21 : {% empty %}

22 : {% if f.help_text %}

23 :

{{ f.help_text }}

24 : {% endif %}

25 : {% endfor %}

26 :

27 : {% endfor %}

28 : {% if searchform_filter %}

Traceback:
File "/home/ralph/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = response.render()
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/response.py" in render
  2.         self._set_content(self.rendered_content)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  3.     content = template.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in render
  4.         return self._render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in _render
  5.     return self.nodelist.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in render
  6.             bit = self.render_node(node, context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  7.         return node.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  8.     return compiled_parent._render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in _render
  9.     return self.nodelist.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in render
  10.             bit = self.render_node(node, context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  11.         return node.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  12.     return compiled_parent._render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in _render
  13.     return self.nodelist.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in render
  14.             bit = self.render_node(node, context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  15.         return node.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  16.         result = block.nodelist.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in render
  17.             bit = self.render_node(node, context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  18.         return node.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  19.             return nodelist.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/base.py" in render
  20.             bit = self.render_node(node, context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/debug.py" in render_node
  21.         return node.render(context)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  22.                     nodelist.append(node.render(context))
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/template/debug.py" in render
  23.         output = force_unicode(output)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/utils/encoding.py" in force_unicode
  24.             s = unicode(s)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/forms/forms.py" in unicode
  25.     return self.as_widget()
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/forms/forms.py" in as_widget
  26.     return widget.render(name, self.value(), attrs=attrs)
    
    File "/home/ralph/project/src/ralph/ui/widgets.py" in render
  27.         mg = DeviceModelGroup.objects.get(id=value)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/manager.py" in get
  28.     return self.get_query_set().get(_args, *_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py" in get
  29.     num = len(clone)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py" in len
  30.             self._result_cache = list(self.iterator())
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py" in iterator
  31.     for row in compiler.results_iter():
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter
  32.     for rows in self.execute_sql(MULTI):
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  33.     cursor.execute(sql, params)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/util.py" in execute
  34.         return self.cursor.execute(sql, params)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py" in execute
  35.         return self.cursor.execute(query, args)
    
    File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/cursors.py" in execute
  36.         self.errorhandler(self, exc, value)
    
    File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/connections.py" in defaulterrorhandler
  37. raise errorclass, errorvalue
    

Exception Type: DatabaseError at /ui/search/info/
Exception Value: (1054, "Unknown column 'discovery_devicemodelgroup.created' in 'field list'")

/ui/ventures/*/venture/ is not compatible with SQLite backend

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/ui/ventures/*/venture/

Django Version: 1.4
Python Version: 2.7.3
Installed Applications:
[u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.sites',
u'django.contrib.messages',
u'django.contrib.staticfiles',
u'django.contrib.admin',
u'djcelery',
u'south',
u'lck.django.common',
u'lck.django.activitylog',
u'lck.django.profile',
u'lck.django.score',
u'lck.django.tags',
u'gunicorn',
u'fugue_icons',
u'bob',
u'tastypie',
u'ralph.account',
u'ralph.business',
u'ralph.cmdb',
u'ralph.discovery',
u'ralph.integration',
u'ralph.ui',
u'ralph.dnsedit',
u'ralph.util',
u'ajax_select',
u'powerdns']
Installed Middleware:
(u'django.middleware.gzip.GZipMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.contrib.sessions.middleware.SessionMiddleware',
u'lck.django.common.middleware.TimingMiddleware',
u'django.middleware.locale.LocaleMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'django.contrib.auth.middleware.AuthenticationMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'lck.django.activitylog.middleware.ActivityMiddleware',
u'lck.django.common.middleware.ForceLanguageCodeMiddleware')

Traceback:
File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  2.             return view_func(request, _args, *_kwargs)
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/views/generic/base.py" in view
  3.         return self.dispatch(request, _args, *_kwargs)
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  4.     return handler(request, _args, *_kwargs)
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/project/src/ralph/ui/views/ventures.py" in get
  5.     return super(VenturesVenture, self).get(_args, *_kwargs)
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/views/generic/base.py" in get
  6.     context = self.get_context_data(**kwargs)
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/project/src/ralph/ui/views/ventures.py" in get_context_data
  7.         datapoints = set(dp for dp, in query.values_list('start').distinct())
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/project/src/ralph/ui/views/ventures.py" in
  8.         datapoints = set(dp for dp, in query.values_list('start').distinct())
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/db/models/query.py" in _result_iter
  9.             self._fill_cache()
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/db/models/query.py" in _fill_cache
  10.                 self._result_cache.append(self._iter.next())
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/db/models/query.py" in iterator
  11.         for row in self.query.get_compiler(self.db).results_iter():
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter
  12.     for rows in self.execute_sql(MULTI):
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  13.     cursor.execute(sql, params)
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/db/backends/util.py" in execute
  14.         return self.cursor.execute(sql, params)
    
    File "/Users/ambv/Documents/Projekty/Python/ralph/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py" in execute
  15.         return Database.Cursor.execute(self, query, params)
    

Exception Type: DatabaseError at /ui/ventures/*/venture/
Exception Value: no such function: GREATEST

dnspython url incorrect in build script

when installing ralph (on ubuntu server 12.04 with all the dependencies installed and database setup etc), either with
$ pip install ralph
or with grabbing the source with git and
$ pip install -e .

i get the following errors on the command line:

Downloading/unpacking dnspython==1.10.0 (from ralph==1.2.5)
Could not find a version that satisfies the requirement dnspython==1.10.0 (from ralph==1.2.5) (from versions: )
No distributions matching the version for dnspython==1.10.0 (from ralph==1.2.5)
Storing complete log in /home/ralph/.pip/pip.log

and in the log:

Downloading/unpacking dnspython==1.10.0 (from ralph==1.2.5)

Getting page http://pypi.python.org/simple/dnspython
URLs to search for versions for dnspython==1.10.0 (from ralph==1.2.5):

No distributions matching the version for dnspython==1.10.0 (from ralph==1.2.5)

Exception information:
Traceback (most recent call last):
File "/home/ralph/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/home/ralph/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/ralph/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 978, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/home/ralph/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/index.py", line 186, in find_requirement
raise DistributionNotFound('No distributions matching the version for %s' % req)
DistributionNotFound: No distributions matching the version for dnspython==1.10.0 (from ralph==1.2.5)

the problem being that the url structure at pypi seems to have changed and https://pypi.python.org/simple/dnspython/1.10.0/ is no longer valid. the new url structure of pypi is: https://pypi.python.org/pypi/dnspython/1.10.0 with the latest version with a download being https://pypi.python.org/pypi/dnspython/1.11.0

i tried to find where in the install scripts the url is set, but i could not locate it. obviously with the line 'dnspython==1.10.0', commented out in setup.py, it builds ralph but then i get errors with
$ ralph syncdb --all

thanks!

Can't add venture

When I open "add venture" link (https://domain/admin/business/venture/add/) i get an error:

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/admin/business/venture/add/

Django Version: 1.4.9
Python Version: 2.7.3
Installed Applications:
[u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.sites',
u'django.contrib.messages',
u'django.contrib.staticfiles',
u'django.contrib.admin',
u'django_rq',
u'south',
u'lck.django.common',
u'lck.django.activitylog',
u'lck.django.profile',
u'lck.django.score',
u'lck.django.tags',
u'gunicorn',
u'fugue_icons',
u'bob',
u'tastypie',
u'ralph.account',
u'ralph.business',
u'ralph.cmdb',
u'ralph.discovery',
u'ralph.deployment',
u'ralph.integration',
u'ralph.ui',
u'ralph.dnsedit',
u'ralph.util',
u'ralph.deployment',
u'ajax_select',
u'powerdns']
Installed Middleware:
(u'django.middleware.gzip.GZipMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.contrib.sessions.middleware.SessionMiddleware',
u'lck.django.common.middleware.TimingMiddleware',
u'django.middleware.locale.LocaleMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'django.contrib.auth.middleware.AuthenticationMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'lck.django.activitylog.middleware.ActivityMiddleware',
u'lck.django.common.middleware.ForceLanguageCodeMiddleware')

Traceback:
File "/home/ralph/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  2.             return self.admin_site.admin_view(view)(_args, *_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  3.                 response = view_func(request, _args, *_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  4.     response = view_func(request, _args, *_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  5.         return view(request, _args, *_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  6.         return bound_func(_args, *_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  7.                 response = view_func(request, _args, *_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  8.             return func(self, _args2, *_kwargs2)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/db/transaction.py" in inner
  9.             return func(_args, *_kwargs)
    
    File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
  10.     ModelForm = self.get_form(request)
    
    File "/home/ralph/local/lib/python2.7/site-packages/ralph/business/admin.py" in get_form
  11.     if obj.verified:
    

Exception Type: AttributeError at /admin/business/venture/add/
Exception Value: 'NoneType' object has no attribute 'verified'

cmdb_integration Zabbix Integration (2.0.7)

Hi

You may wish to update http://ralph.allegrogroup.com/doc/cmdb.html with the new arguments and process for integration.

Currently, I am unable to integrate Ralph with Zabbix as below.

How do I provide more debug info?

(ralph)ralph@QASVM112:~$ ralph cmdb_integration --cmdb_zabbix -v 3
[zabbix_hosts] ... Done
Traceback (most recent call last):
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/tasks.py", line 199, in _run_plugin
**context)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/util/plugin.py", line 84, in run
return BY_NAME[chain]func_name
File "/home/ralph/local/lib/python2.7/site-packages/ralph/cmdb/integration/sync.py", line 56, in zabbix_triggers
ZabbixImporter().import_triggers()
File "/home/ralph/local/lib/python2.7/site-packages/ralph/cmdb/integration/sync.py", line 85, in import_triggers
ch.save()
File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/models.py", line 201, in save
super(TimeTrackable, self).save(_args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/monkeys.py", line 44, in
using)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 551, in save_base
result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/manager.py", line 203, in _insert
return insert_query(self.model, objs, fields, **kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 1593, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 912, in execute_sql
cursor.execute(sql, params)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
return self.cursor.execute(sql, params)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 114, in execute
return self.cursor.execute(query, args)
File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 176, in execute
if not self._defer_warnings: self._warning_check()
File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 92, in _warning_check
warn(w[-1], self.Warning, 3)
Warning: Out of range value for column 'trigger_id' at row 1

Exception in plugin 'zabbix_triggers' for ''.
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==1.2.9', 'console_scripts', 'ralph')()
File "/home/ralph/local/lib/python2.7/site-packages/ralph/main.py", line 41, in main
execute_from_command_line(sys.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(_args, *_options.dict)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(_args, *_options)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/cmdb/management/commands/cmdb_integration.py", line 56, in handle
{'queue': chain_name}, chain_name, interactive=interactive,
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/tasks.py", line 137, in run_chain
outputs)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/tasks.py", line 240, in _run_chain
done_requirements, outputs)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/tasks.py", line 137, in run_chain
outputs)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/tasks.py", line 237, in _run_chain
interactive, done_requirements, outputs)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/tasks.py", line 199, in _run_plugin
**context)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/util/plugin.py", line 84, in run
return BY_NAME[chain]func_name
File "/home/ralph/local/lib/python2.7/site-packages/ralph/cmdb/integration/sync.py", line 56, in zabbix_triggers
ZabbixImporter().import_triggers()
File "/home/ralph/local/lib/python2.7/site-packages/ralph/cmdb/integration/sync.py", line 85, in import_triggers
ch.save()
File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/models.py", line 201, in save
super(TimeTrackable, self).save(_args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/lck/django/common/monkeys.py", line 44, in
using)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 463, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/base.py", line 551, in save_base
result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/manager.py", line 203, in _insert
return insert_query(self.model, objs, fields, **kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/query.py", line 1593, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 912, in execute_sql
cursor.execute(sql, params)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
return self.cursor.execute(sql, params)
File "/home/ralph/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 114, in execute
return self.cursor.execute(query, args)
File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 176, in execute
if not self._defer_warnings: self._warning_check()
File "/home/ralph/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 92, in _warning_check
warn(w[-1], self.Warning, 3)
_mysql_exceptions.Warning: Out of range value for column 'trigger_id' at row 1

New problem with SuperMicro IPMI and Discovery

Hi
I have another problem this time, my Ralph installation dosen't collect any data from IMPI from my test server (in the same network).

I edited my .ralph/settings file, to something like this:

IPMI_USER = "User_created_in_IPMI"
IPMI_PASSWORD = "Password"

I check many time password and login - both are correct and even run "ipmitool" from comand line.

Thanks for any suggestion.

Log's and others:

(ralph)ralph@Ralf:~$ ralph report
Traceback (most recent call last):
File "/home/ralph/bin/ralph", line 9, in
load_entry_point('ralph==1.2.6', 'console_scripts', 'ralph')()
File "/home/ralph/local/lib/python2.7/site-packages/ralph/main.py", line 41, in main
execute_from_command_line(sys.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 443, in execute_from_command_line
utility.execute()
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/ralph/local/lib/python2.7/site-packages/django/core/management/init.py", line 69, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/home/ralph/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/management/commands/report.py", line 19, in
from ralph.util import pricing
File "/home/ralph/local/lib/python2.7/site-packages/ralph/util/pricing.py", line 18, in
from ralph.discovery.models import (
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/models.py", line 122, in
import ralph.discovery.plugins # noqa
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/plugins/init.py", line 8, in
import(name, globals(), locals(), [], -1)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/discovery/plugins/cache_price.py", line 10, in
from ralph.util import pricing
ImportError: cannot import name pricing


(ralph)ralph@Ralf:~$ ralph discover 172.21.208.16
[ping] 172.21.208.16... up!
[http] 172.21.208.16... Unspecified
[http_supermicro] 172.21.208.16... no match.
[puppet] 172.21.208.16... not configured
[idrac] 172.21.208.16... not configured
[ssh_cisco_asa] 172.21.208.16... no match:
[ssh_ibm_bladecenter] 172.21.208.16... No authentication methods available
[ssh_onstor] 172.21.208.16... no credentials.
[ipmi] 172.21.208.16... no match.
[snmp] 172.21.208.16... no answer.
[hp_oa_xml] 172.21.208.16... silent.
[ssh_proxmox] 172.21.208.16... no match.
[http_ibm_system_x] 172.21.208.16... no credentials.
[ssh_hp_msa] 172.21.208.16... no credentials.
[ssh_ssg] 172.21.208.16... no credentials.
[ssh_aix] 172.21.208.16... no auth.
[ilo_hp] 172.21.208.16... not configured
[plugins_check] 172.21.208.16... ping
[position] 172.21.208.16... no device.
[cache_price] 172.21.208.16... no device.
[software] 172.21.208.16... no device.


(ralph)ralph@Ralf:~/lib/python2.7/site-packages/ralph$ tail -n 30 runtime.log
return handler(request, _args, *kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/ui/views/ventures.py", line 262, in get
self.form = RolePropertyForm(initial={'venture': self.venture.id})
AttributeError: 'unicode' object has no attribute 'id'
16:27:10,785 ERROR [MainProcess 2096] base - Internal Server Error: /ui/ventures/
/roles/
Traceback (most recent call last):
File "/home/ralph/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, *_callback_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, _args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/views/generic/base.py", line 48, in view
return self.dispatch(request, _args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in dispatch
return handler(request, _args, *kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/ui/views/ventures.py", line 262, in get
self.form = RolePropertyForm(initial={'venture': self.venture.id})
AttributeError: 'unicode' object has no attribute 'id'
16:27:24,580 ERROR [MainProcess 2096] base - Internal Server Error: /ui/ventures/
/roles/
Traceback (most recent call last):
File "/home/ralph/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = callback(request, *callback_args, *_callback_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
return view_func(request, _args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/views/generic/base.py", line 48, in view
return self.dispatch(request, _args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in dispatch
return handler(request, _args, *_kwargs)
File "/home/ralph/local/lib/python2.7/site-packages/ralph/ui/views/ventures.py", line 262, in get
self.form = RolePropertyForm(initial={'venture': self.venture.id})
AttributeError: 'unicode' object has no attribute 'id'


(ralph)ralph@Ralf:~/lib/python2.7/site-packages/ralph$ ralph test ralph.util
Creating test database for alias 'default'...

.ss...........

Ran 14 tests in 22.217s

OK (skipped=2)
Destroying test database for alias 'default'...
(ralph)ralph@Ralf:~/lib/python2.7/site-packages/ralph$

Unreachable code in HTTP discovery plugin?

It seems that in https://github.com/allegro/ralph/blob/master/src/ralph/discovery/plugins/http.py#L90

the code path

      elif family in ('lighttpd',):
        if 'Modular Server Control' in document:
            family = 'Modular'
        elif '<title>IMM</title>' in document:
            family = 'IBM System X'

isn't reachable as

    FAMILIES = {
    'GoAhead-Webs': 'Thomas-Krenn',
    'Apache': 'Apache',
    'Sun-ILOM-Web-Server': 'Sun',
    'Virata-EmWeb': 'SSG',
    'Allegro-Software-RomPager': 'RomPager',
    'cisco-IOS': 'Cisco',
    'IBM_HTTP_Server': 'IBM',
    'Mbedthis-Appweb': 'Dell',
    '': 'Unspecified',
}

doesn't include lighttpd...

fatal: list index out of range

(ralph)ralph@noc:$ ralph discover 127.0.0.1
fatal: list index out of range
(ralph)ralph@noc:
$ ralph discover --remote 127.0.0.1
fatal: list index out of range

and how can to set ralph client for server ?
i can add any thing on web interface .
i want to know howto discover some server or rack to ralph.

Addind data centers in Networks requires an invalid save erquest

After adding a new networks via admin/discovery/network/add/ I needed to create a new data center, clicked the Add button, chosen a name and then clicked save. Only the new data center didn't appear in the option list, after clicking Save I got a missing required field error and then could check the proper DC.
It's a really minor annoyance and probably an issues with django itself, but I got hit by it anyway ;)

when localhost has a name, puppet test fails

$ hostname
vd-bennyd
$ ralph test ralph
Creating test database for alias 'default'...
.ss.......................................ss...........sss.ssssssss.........................................................................................................F..............................................................................................................................ss.
======================================================================
FAIL: test_get_ip_addresses_hostnames_sets (ralph.scan.tests.plugins.test_puppet.PuppetPluginTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/ralph/src/ralph/scan/tests/plugins/test_puppet.py", line 126, in test_get_ip_addresses_hostnames_sets
    ({'127.0.0.1', '127.0.0.2'}, {'localhost'}),
AssertionError: Tuples differ: (set([u'127.0.0.2', u'127.0.0.... != (set([u'127.0.0.2', u'127.0.0....

First differing element 1:
set([u'vd-bennyd', 'localhost'])
set([u'localhost'])

- (set([u'127.0.0.1', u'127.0.0.2']), set(['localhost', u'vd-bennyd']))
?                                                     --------------

+ (set([u'127.0.0.1', u'127.0.0.2']), set([u'localhost']))
?                                          +


----------------------------------------------------------------------
Ran 302 tests in 101.329s

Default password

I cannot log in starting Ralph..what is the default password, is it the same as in mysql ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.