View all labels in Jenkins
Haven't installed/tried it myself, but the "label linked jobs" jenkins plugin has a label dashboard as one of its features.. it sounds like this is what you're looking for
Just came across this question. Since I did not want to install a new plugin I tried to achieve the same using the script console.
You even have to possibility to filter-out labels. The following example will filter-out any node name from the list - which is considered a label, too, but probably not relevant to most users:
def allLabels = []
Jenkins.instance.nodes.each { node ->
node.assignedLabels.each { label ->
if (label as String != node.name) {
allLabels += label
}
}
}
println allLabels.unique().join('\n')