It is often desirable to allow the value of the attribute that pingd sets directly as a the score for a particular rule.
If you set the pingd scaling factor to 100, then having access to one node is worth 100, 2 nodes is worth 200, and so on.
This way, if all else is equal, the node with the highest ping connectivity will be selected. If two or more eligible nodes have the same score, then they will be given equal weight according to the rule below.
<rsc_location id="my_resource:connected" rsc="my_resource">
<rule id="my_resource:connected:rule" score_attribute="pingd" >
<expression id="my_resource:connected:expr:defined"
attribute="pingd" operation="defined"/>
</rule>
</rsc_location>
Of course, if you have configured the pingd daemon to set some attribute name besides its default (pingd), then you need to change the name of the score_attribute above from pingd to whatever attribute you have configured the pingd daemon to use.