You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Template:Server: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Dzahn
(rm Ganglia references)
imported>Krinkle
No edit summary
Line 31: Line 31:
{{!}} bgcolor=#f8f8ff {{!}} {{#if: {{{usage-multi|}}}
{{!}} bgcolor=#f8f8ff {{!}} {{#if: {{{usage-multi|}}}
  | {{{usage-multi}}}
  | {{{usage-multi}}}
  | {{#ifeq: {{lc:{{{status|unknown}}}}} | decommissioned
  | {{#ifeq: {{lc:{{{status|}}}}} | decommissioned
   | {{{usage|unknown}}}
   | {{{usage|unknown}}}
   | {{Server/usage|{{#if:{{{usage|}}}|{{{usage|}}}|{{#if:{{{server_group|}}}|{{{server_group}}}|unknown}}}}}}
   | {{Server/usage|{{#if:{{{usage|}}}|{{{usage|}}}|{{#if:{{{server_group|}}}|{{{server_group}}}|unknown}}}}}}
Line 41: Line 41:
|-
|-
| bgcolor=#efefef {{!}} Overall:
| bgcolor=#efefef {{!}} Overall:
| bgcolor=#f8f8ff {{!}} {{Server/status|{{{status|unknown}}}}}
| bgcolor=#f8f8ff {{!}} {{Server/status|{{{status|<noinclude><!-- demo -->online</noinclude>}}}}}
|-
|-
| bgcolor=#efefef {{!}} Icinga<sup>[[Icinga|?]]</sup>:
| bgcolor=#efefef {{!}} Icinga<sup>[[Icinga|?]]</sup>:
Line 94: Line 94:
* a subcategory of [[:Category:Servers by usage]] (based on the <tt>{{{usage}}}</tt>)
* a subcategory of [[:Category:Servers by usage]] (based on the <tt>{{{usage}}}</tt>)
* a subcategory of [[:Category:Servers by status]] (based on the <tt>{{{status}}}</tt>)
* a subcategory of [[:Category:Servers by status]] (based on the <tt>{{{status}}}</tt>)
* a subcategory of [[:Category:Servers by group]] (based on the <tt>{{{server_group}}}</tt>/<tt>{{{server_nodename}}}</tt>)


==Parameters==
==Parameters==
Line 100: Line 99:
;name: (optional: defaults to <tt><nowiki>{{PAGENAME}}</nowiki></tt>
;name: (optional: defaults to <tt><nowiki>{{PAGENAME}}</nowiki></tt>
;serial: (optional)
;serial: (optional)
;usage: (optional) ID of usage (see [[Category:Servers by usage]] for possible values)
;usage: (optional) ID of usage (see [[:Category:Servers by usage]] for possible values)
;usage-multi: (optional) Overwrites <code>usage</code> for embedding multiple templates directly.
;usage-multi: (optional) Overwrites <code>usage</code> for embedding multiple templates directly.
;status: (optional) Use <code>online</code>, <code>offline</code>, <code>unknown</code> or <code>decommissioned</code> (see [[Template:Server/status]])
;status: (optional) Use <code>online</code>, <code>offline</code>, <code>unknown</code> or <code>decommissioned</code> (see [[Template:Server/status]])

Revision as of 23:26, 1 March 2018

server
Location: sandbox
Server group: Example services
Node name: foo.examplenet (fingerprint)
Status
Overall: Symbol support vote.png Active
Icinga?: host status services status
Hardware
Software

This template categorizes the host page into:

Parameters

location
(required) Which cluster this server is located in.
name
(optional: defaults to {{PAGENAME}}
serial
(optional)
usage
(optional) ID of usage (see Category:Servers by usage for possible values)
usage-multi
(optional) Overwrites usage for embedding multiple templates directly.
status
(optional) Use online, offline, unknown or decommissioned (see Template:Server/status)
memory
(optional)
cpu
(optional)
hdd
(optional)
os
(optional)
kernel
(optional)
usage_version
(optional)
server_group
(optional) Name of organizational server group (not physical per se).
server_nodename
(optional) "Node" hostname.
racktables_id
(optional) The "object_id" of the server in Racktables

<templatedata> { "params": { "name": { "label": "Name", "description": "Name of the server", "type": "string", "default": "Server" }, "location": { "label": "Location", "description": "Which cluster this server is located in.", "example": "eqiad", "type": "string", "required": true, "suggested": true }, "usage": { "label": "Usage", "description": "Main purpose of the server. See \"Category:Servers by usage\" for expected values.", "type": "string", "suggested": true }, "status": { "label": "Status", "description": "Use one of \"online\", \"offline\", \"unknown\" or \"decom\"", "type": "string", "default": "unknown" } }, "paramOrder": [ "name", "location", "status", "usage" ], "format": "block" } </templatedata>

Usage

{{Server
| location = 
| name = 
| racktables_id = 
| usage = 
| status = online
| server_group = 
| server_nodename = 
}}

Example