--- /dev/null
+hello world
+===========
+
+This is a simple module skeleton for documentation purposes.
+
+Enabling
+--------
+
+The *hello* module is enabled with::
+
+ ceph mgr module enable hello
+
+To check that it is enabled, run::
+
+ ceph mgr module ls
+
+After editing the module file (found in ``src/pybind/mgr/hello/module.py``), you can see changes by running::
+
+ ceph mgr module disable hello
+ ceph mgr module enable hello
+
+or::
+
+ init-ceph restart mgr
+
+To execute the module, run::
+
+ ceph hello
+
+The log is found at::
+
+ build/out/mgr.x.log
+
+
+Documenting
+-----------
+
+After adding a new mgr module/plugin, be sure to add its documentation to ``doc/mgr/plugin_name.rst``.
+Also, add a link to your new plugin into ``doc/mgr/index.rst``.
--- /dev/null
+
+"""
+A hello world module
+
+See doc/mgr/hello.rst for more info.
+"""
+
+from mgr_module import MgrModule
+
+
+class Hello(MgrModule):
+ COMMANDS = [
+ {
+ "cmd": "hello "
+ "name=person_name,type=CephString,req=false",
+ "desc": "Prints hello world to mgr.x.log",
+ "perm": "r"
+ },
+ ]
+
+ def handle_command(self, cmd):
+ self.log.info("hello_world_info")
+ self.log.debug("hello_world_debug")
+ self.log.error("hello_world_error")
+
+ status_code = 0
+ output_buffer = "Output buffer is for data results"
+ output_string = "Output string is for informative text"
+ message = "hello world!"
+
+ if 'person_name' in cmd:
+ message = "hello, " + cmd['person_name'] + "!"
+
+ return status_code, output_buffer, message + "\n" + output_string