このコンテンツは選択した言語では利用できません。

1.3. JBoss ON CLI Scripts and JBoss ON Server Scripts


There are two major ways to access the remote API: through the JBoss ON CLI and through a separate JBoss ON server script.
The scripts themselves are more or less identical, with the exception of some methods that are available when the JBoss ON CLI is run interactively. Both CLI scripts and server-side scripts are written in JavaScript and use the remote API primarily, with support from the domain API for tasks like searches.
The main difference is in how the scripts are invoked:
  • The JBoss ON CLI can be run manually, execute a script file, and even be invoked automatically by a system tool like cron. The CLI can connect to to any JBoss ON server and can be run remotely.
    Essentially, the CLI is a script execution engine. It exposes the remote API in a scripting language, which makes it more convenient to interact dynamically the JBoss ON server.
  • Server-side scripts are uploaded into a content repository, managed in the JBoss ON server database, and are then invoked in response to a fired alert. Even though the server-side scripts are located on the server, they still use the same APIs to communicate with the server as other CLI scripts.
There is no way to define a dependency on another JBoss ON script or to pull in functions defined in a utility script. The CLI allows you to load multiple scripts into a session using the exec command:
$ login -u rhqadmin -p rhqadmin
$ exec -f samples/util.js
$ exec /opt/my-scripts/mySupportScript.js
$ exec /opt/my-scripts/myScript.js
Copy to Clipboard Toggle word wrap
With a server-side script, all required functions must be included in the script itself because the server runs the script on itself, locally. There is no session to load outside scripts in.
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat