kibana/x-pack/plugins/monitoring
Liza Katz 8fa81b7fdc
New platform cleanup autoload - step 1 (#33765)
* Explicit dependencies to doc_title

* Explicit dependencies to
    - kbn_top_nav
    - saved_object_save_as_checkbox

* Explicit dependencies to filter_bar

* Explicit dependency to query_bar

* Removed modules from autoloades that never
used implicitly:
- bound_to_config_obj
- debounce
- filter_manager
- index_patterns
- parse_query
- persisted_log
- timefilter

* Removed modules from autoload (never used implicitly)
- events

* Explicit dependency to bind + typo fix

* Explicit dependency to fancy_forms

* Explicit dependency to $listen

* Explicit dependency to timepicker

* Moved kbn-infinite-scroll directive to doc_table

* Explicit dependency on directives
- css truncate
- inequality

* Explicit dependecy to input_focus directive

* Explicit dependency to json-input directive

* Explicit dependency on directives:
 - input_focus
 - paginate

* Explicit dependency on paginated-selectable-list directive

* Explicit dependency on saved-object-finder directive

* Moved validate_json directive into agg_types

* Don't include directives implicitly
2019-03-28 13:53:10 +02:00
..
__tests__ [@kbn/expect] "fork" expect.js into repo (#33761) 2019-03-25 09:56:48 -07:00
common [@kbn/expect] "fork" expect.js into repo (#33761) 2019-03-25 09:56:48 -07:00
public New platform cleanup autoload - step 1 (#33765) 2019-03-28 13:53:10 +02:00
server Update copy to refer to Cross-Cluster Search/Replication. (#33872) 2019-03-27 19:53:19 -07:00
.agignore Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
.kibana-plugin-helpers.json Convert all Less files to Sass in monitoring, use EUI variable scope (#20995) 2018-08-13 08:18:08 -07:00
config.js Removing deprecated xpack.monitoring.report_stats setting (#30017) 2019-02-04 19:37:32 -08:00
deprecations.js Removing deprecated xpack.monitoring.report_stats setting (#30017) 2019-02-04 19:37:32 -08:00
index.js [I18n] Translate monitoring - uiExports (#27195) 2018-12-17 22:50:15 +03:00
init.js Introduce Elasticsearch service. (#28344) 2019-02-28 17:22:07 +02:00
README.md Migration to Babel7 and @babel/preset-typescript (#33093) 2019-03-26 20:44:03 +00:00
ui_exports.js Update the title in the left nav (#28102) 2019-01-07 12:28:07 -05:00

Using Monitoring

The easiest way to get to know the new Monitoring is probably by reading the docs.

Install the distribution the way a customer would is pending the first release of Unified X-Pack plugins.

Developing

You will need to get Elasticsearch and X-Pack plugins for ES that match the version of the UI. The best way to do this is to run gradle run from a clone of the x-plugins repository.

To set up Monitoring and automatic file syncing code changes into Kibana's plugin directory, clone the kibana and x-plugins repos in the same directory and from x-plugins/kibana/monitoring, run yarn start.

Once the syncing process has run at least once, start the Kibana server in development mode. It will handle restarting the server and re-optimizing the bundles as-needed. Go to https://localhost:5601 and click Monitoring from the App Drawer.

Running tests

  • Run the command:

    yarn test
    
  • Debug tests Add a debugger line to create a breakpoint, and then:

    gulp sync && mocha debug --compilers js:@babel/register /pathto/kibana/plugins/monitoring/pathto/__tests__/testfile.js
    

Multicluster Setup for Development

To run the UI with multiple clusters, the easiest way is to run 2 nodes out of the same Elasticsearch directory, but use different start up commands for each one. One node will be assigned to the "monitoring" cluster and the other will be for the "production" cluster.

  1. Add the Security users:
% ./bin/x-pack/users useradd -r remote_monitoring_agent -p notsecure remote
% ./bin/x-pack/users useradd -r monitoring_user -p notsecure monitoring_user
  1. Start up the Monitoring cluster:
% ./bin/elasticsearch \
-Ehttp.port=9210 \
-Ecluster.name=monitoring \
-Epath.data=monitoring-data \
-Enode.name=monitor1node1
  1. Start up the Production cluster:
% ./bin/elasticsearch \
-Expack.monitoring.exporters.id2.type=http \
-Expack.monitoring.exporters.id2.host=http://127.0.0.1:9210 \
-Expack.monitoring.exporters.id2.auth.username=remote \
-Expack.monitoring.exporters.id2.auth.password=notsecure \
-Ecluster.name=production \
-Enode.name=prod1node1 \
-Epath.data=production-data
  1. Set the Kibana config:
% cat config/kibana.dev.yml
xpack.monitoring.elasticsearch:
  url: "http://localhost:9210"
  username: "kibana"
  password: "changeme"
  1. Start another Kibana instance:
% yarn start
  1. Start a Kibana instance connected to the Monitoring cluster (for running queries in Sense on Monitoring data):
% ./bin/kibana --config config/kibana.dev.yml --elasticsearch.hosts http://localhost:9210 --server.name monitoring-kibana --server.port 5611