[rabbitmq-discuss] RabbitMQ 3.1.0 HTTP API rates are always zero

Darrell Burgan dburgan at peopleanswers.com
Mon Jun 3 15:54:52 BST 2013


Hi Simon, well I'm certain I'm hitting the same server. What version of RabbitMQ are you using that is generating the correct results? I'm using 3.1.0.

As to user permissions, the user I am logged in as doing the API is same as the one I am looking at the RabbitMQ management console with. The user has administrator rights and full access to the default vhost /, which is the only vhost we have.

One other thing I didn't mention is that we have two RabbitMQ instances on two different machines clustered together. Does this have any bearing on statistics? Note I get the same incorrect results on both servers.

Is there some configuration item I might have missed? Here are the configuration files:

enabled_plugins:

	[rabbitmq_management].

rabbitmq.config:

	[
		{mnesia, [{dump_log_write_threshold, 100}]},
		{rabbit, [
			{cluster_nodes, ['rabbit at xxx, 'rabbit at yyy]},
			{tcp_listeners, [5672]}
		]}
	].

rabbitmq-env.conf:

	RABBITMQ_NODE_PORT=5672
	RABBITMQ_NODENAME=rabbit at xxx
	RABBITMQ_NODE_IP_ADDRESS=10.xxx.xxx.xxx
	RABBITMQ_MNESIA_BASE=/usr/local/rabbitmq/mnesia	

I did install the latest erlang from the RHEL EPEL repositories. I then installed RabbitMQ by downloading the RPM directly from rabbitmq.com and installing.

The "rabbitmqctl environment" command gives this:

	[{auth_backends,[rabbit_auth_backend_internal]},
	 {auth_mechanisms,['PLAIN','AMQPLAIN']},
	 {backing_queue_module,rabbit_variable_queue},
	 {cluster_nodes,[rabbit at xxx,rabbit at yyy]},
	 {cluster_partition_handling,ignore},
	 {collect_statistics,fine},
	 {collect_statistics_interval,5000},
	 {default_permissions,[<<".*">>,<<".*">>,<<".*">>]},
	 {default_user,<<"guest">>},
	 {default_user_tags,[administrator]},
	 {default_vhost,<<"/">>},
	 {delegate_count,16},
	 {disk_free_limit,1000000000},
	 {enabled_plugins_file,"/etc/rabbitmq/enabled_plugins"},
	 {error_logger,{file,"/var/log/rabbitmq/rabbit at xxx.log"}},
	 {frame_max,131072},
	 {heartbeat,600},
	 {hipe_compile,false},
	 {included_applications,[]},
	 {log_levels,[{connection,info}]},
	 {msg_store_file_size_limit,16777216},
	 {msg_store_index_module,rabbit_msg_store_ets_index},
	 {plugins_dir,"/usr/lib/rabbitmq/lib/rabbitmq_server-3.1.0/sbin/../plugins"},
	 {plugins_expand_dir,"/u01/rabbitmq/mnesia/rabbit at xxx-plugins-expand"},
	 {queue_index_max_journal_entries,65536},
	 {reverse_dns_lookups,false},
	 {sasl_error_logger,{file,"/var/log/rabbitmq/rabbit at xxx-sasl.log"}},
	 {server_properties,[]},
	 {ssl_cert_login_from,distinguished_name},
	 {ssl_listeners,[]},
	 {ssl_options,[]},
	 {tcp_listen_options,[binary,
                      {packet,raw},
                      {reuseaddr,true},
                      {backlog,128},
                      {nodelay,true},
                      {linger,{true,0}},
                      {exit_on_close,false}]},
	 {tcp_listeners,[{"10.xxx.xxx.xxx",5672}]},
	 {trace_vhosts,[]},
	 {vm_memory_high_watermark,0.4}]

And "rabbitmqctl status" gives this:

	Status of node rabbit at xxx ...
	[{pid,5046},
	 {running_applications,
	     [{rabbitmq_management,"RabbitMQ Management Console","3.1.0"},
	      {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.1.0"},
	      {webmachine,"webmachine","1.9.1-rmq3.1.0-git52e62bc"},
	      {mochiweb,"MochiMedia Web Server","1.4.1"},
	      {crypto,"CRYPTO version 2","2.0.4"},
	      {rabbitmq_management_agent,"RabbitMQ Management Agent","3.1.0"},
	      {rabbit,"RabbitMQ","3.1.0"},
	      {os_mon,"CPO  CXC 138 46","2.2.7"},
	      {xmerl,"XML parser","1.2.10"},
	      {inets,"INETS  CXC 138 49","5.7.1"},
	      {mnesia,"MNESIA  CXC 138 12","4.5"},
	      {amqp_client,"RabbitMQ AMQP Client","3.1.0"},
	      {sasl,"SASL  CXC 138 11","2.1.10"},
	      {stdlib,"ERTS  CXC 138 10","1.17.5"},
	      {kernel,"ERTS  CXC 138 10","2.14.5"}]},
	 {os,{unix,linux}},
	 {erlang_version,
	     "Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:30] [kernel-poll:true]\n"},
	 {memory,
	     [{total,46630064},
	      {connection_procs,8435640},
	      {queue_procs,333496},
	      {plugins,495808},
	      {other_proc,9938040},
	      {mnesia,92008},
	      {mgmt_db,9904},
	      {msg_index,36744},
	      {other_ets,1236848},
	      {binary,1712512},
	      {code,18720655},
	      {atom,1642329},
	      {other_system,3976080}]},
	 {vm_memory_high_watermark,0.4},
	 {vm_memory_limit,6732223283},
	 {disk_free_limit,1000000000},
	 {disk_free,121342373888},
	 {file_descriptors,
	     [{total_limit,3996},
	      {total_used,103},
	      {sockets_limit,3594},
	      {sockets_used,101}]},
	 {processes,[{limit,1048576},{used,1209}]},
	 {run_queue,0},
	 {uptime,712367}]
	...done.

I'm kind of at a loss. Is there a rabbitmqctl command I can run that returns the rate statistics (I didn't see it in rabbitmqctl report) ... ?

Thanks,
Darrell



-----Original Message-----
From: Simon MacMullen [mailto:simon at rabbitmq.com] 
Sent: Monday, June 03, 2013 5:25 AM
To: Discussions about RabbitMQ
Cc: Darrell Burgan
Subject: Re: [rabbitmq-discuss] RabbitMQ 3.1.0 HTTP API rates are always zero

Hmm, not sure I can say much more than "works for me".

The numbers that are shown in the web UI are taken from the request http://xxx:15672/api/overview (albeit without the ?columns= parameter); there is only one source for these numbers.

One thing you might want to check is if you are using a different user for web UI vs nagios. Users that do not have the "administrator" or "monitoring" tags will only see message rates for vhosts they have access to - could you be seeing that?

Another possibility (and I know this might sound patronising, but we all make mistakes) - are you talking to the same server in each case?

Cheers, Simon


More information about the rabbitmq-discuss mailing list