Share

Configuration

Authentication SettingsTime ZoneShared SecretBusiness HoursFinanceSelf-Serve RegistratonPortal AppearanceEmail TextCollecting Metric DataImporting Calendar EventsEquipment DiscoveryServices & EquipmentGet ServicesService Status Website IntegrationService Availability Over a PeriodActive Directory LookupSpreadsheet Export Import

How to review/change the Setup Authentication


From the left Menu bar select Setup and then choose Authentication from the options.



A screen will appear which will allow you to update the Setup Authentication (i.e. where the information for your usernames and passwords come from). Users can either be entered manually using the Setup or a directory can be used.



Fill out the required fields and select Save Settings. If you would like to confirm that the details entered are valid, select Test Authentication

Time Zone


In the Setup under Options you can edit the GMT_TIME_OFFSET option and set it to your time zone. The value entered is either 0 for GMT or a + or - number indicating the number of hours ahead or behind GMT. For instance +10 is ten hours ahead of GMT for Australian Eastern time



In addition the TIMEZONE_CITY option may be set. If set daylight savings times will be taken into consideration.

OptionExample Value
TIMEZONE_CITY Australia/Brisbane

Shared Secret


In order to ensure data injected by agents is genuine a shared secret is passed by the agent. Set this to a combination of letters and numbers but do not use spaces or symbols:



OptionExample Value
SECRET MYSECRET

Business Hours


Business hours should be set as follows and stored in JSON format.




OptionExample Value
BUSINESS_HOURS{"Mon":"09:00-17:00","Tue":"09:00-17:00","Wed":"09:00-17:00","Thu":"09:00-17:00","Fri":"09:00-17:00"}

Finance


Currency and start of year financial options are configured using the following two options:


OptionExample Value
CURRENCY_SYMBOL$
START_OF_FINANCIAL_YEAR01-01
SALARY_CPI_MULTIPLIER1.04


The START_OF_FINANCIAL_YEAR option is of the format day-month, i.e. 01-01 is the 1st of January. 01-07 means the start of the financial year is the 1st of July. Do not include the year.

The SALARY_CPI_MULTIPLIER option is used when calculating salaries in future years. Salaries for next year are calculated to this year"s cost multiplied by this value, so 1.04 is a 4% annual increase.

Self-Serve Registration


To enable self-serve registration the option ALLOW_SELF_REGISTER needs to be set to yes.



OptionExample Value
ALLOW_SELF_REGISTERyes

Portal Appearance


To change the portal colours enter the desired colours in the fields and click save. When the primary colour is changed ServiceView will automaticall calulate lighter and darker colours. These can be overwritten if desired by entering new values.



Setting Arbitrary Text on the Portal Header

If you are running more than one instance of ServiceView you may wish to distinguish between them by adding text on the header of the portal, such as Development ServiceView



To achieve this use an environment variable in the apache virtual hosts file.

SetEnv HEADER_MSG "Development ServiceView"

Email Text


ServiceView uses options to store standard meial text. Set these to the desired values.


DR Plan Email

Set the option 'CRON_DR_PLAN_MESSAGE' to the desired value.

Sample value:

<p style="margin-top:10px;margin-bottom:10px;">Dear Stakeholder,</p>
<p style="margin-bottom:10px;">Please find attached the latest copy of the SV IT service restoration plan. Please review the plan for accuracy and either make the necessary changes directly in ServiceView at <a href="http://serviceview.its.sv.edu.au">serviceview.its.sv.edu.au</a> or send an email to <a href="mailto:serviceview@sv.edu.au">serviceview@sv.edu.au</a> with notification of errors.</p>
<p style="margin-bottom:10px;">In order to be properly prepared in the event of a disaster we suggest you download the attached service restoration plan to your laptop or ipad.</p>
<p style="margin-bottom:10px;">Best regards,</p>
<p>ServiceView team<br>
http://serviceview.its.sv.edu.au<br>
serviceview@sv.edu.au</p>

Service Status Email

The following options are used to compose the service status emails:

SERVICE_STATUS_LINKThe link to the service status page entry for this service status event. e.g. http://www.<serviceview_url>/?incident_id= The event_id will be automatically appended to the link when the email is composed.
SERVICE_STATUS_FROM_NAMEThe name the email is sent from. e.g. ITS Service Status
SERVICE_STATUS_SEND_ALL_EMAILS_TOThe distribution list name to send service status emails to.
SERVICE_STATUS_TO_EMAILThe email address service status emails will be sent to. Other recipients will be BCC included so as to not disclose their identities.
SERVICE_STATUS_FROM_EMAILThe email address emails will be send from, and where replies and bounces will go to.
SERVICE_STATUS_SIGNOFF_TEXTThe signoff text of service status emails.

Agents


Data is populated into the ServiceView database using agents. An agent is a script, usually running daily on the service infrastructure, collecting the data and then posting it to ServiceView. Agents can be written in any language as long as they are able to perform HTTP GET requests.

Agents an be used to inject metric data,calendar envents and equipement


Collecting Metric Data

The HTTP address used to send metric data for a given service is made up of:

http://<serviceview_url>/record.php?service=&metric=<metricname>&date=<date>&secret=<secret>&value=<value>&accumulate=0

Parameters are as follows:

<servicecode>The unique code associated with each service entered from the add or edit service dialog. See adding services section.
<metricname>The name of the metric this data is for. See adding metrics section.
<date>The date the value applies to in either YYYY-MM-DD or DD-MM-YYYY. For example 31-01-2012. Note Historic data can be entered by specifying dates in the past.
<secret>The value of the SECRET
<value>The actual value of the data. For instance 98.7 for 98.7 percent. Note do not include the % symbol or units.
<accumulate>This parameter can be set to keep a running total for this metric rather than sending a total. For instance to record the number of password changes a day include accumulate=1 and submit the URL every time a password is changed. ServiceView will add up the total for the day. If accumulate is not passed or set to 0 each submission will overwrite the previous value.


The HTTP request can either be sent using a HTTP GET or POST request.

The URL to use for each metric can be obtained on the services page under the reports tab. On the right side of each metric three icons, the first is the URL to inject data.

If the metric or service hasn't been added do that first. See sections on adding services and metrics.

Perl Example


#!/usr/bin/perl 

use LWP::Simple;
use CGI;

$url = 'http://serviceview.its.uq.edu.au/record.php
	     ?service=' . CGI::escape($service) . 
                        '&metric=' . CGI::escape($metric) .
                        '&date=' .     CGI::escape($date) .
                        '&secret= .
                        '&value=' . $value;
$result = get($url);
if ($result !~ /SUCCESS/) {
        print "Cannot post to ServiceView: ".$result;
} 

Importing Calendar Events

Calendar events can be injected into the ServiceView database using an HTTP POST comprising:

http://<serviceview_url>/event.php?service=<servicecode>&start=<start>&end=<end>&title=<title>&description=<description>&service_availability =<service_availability>&event_group_name =<event_group_name>&secret=<secret>

Parameters are as follows:

<servicecode>The unique code associated with each service entered from the add or edit service dialog. See adding services section
<start>Date and time event started
<end>Date and time event ended
<title>The event title
<description>The event description
<service_availability> Service availability code, possible values are:
 Service was not available
 Service was reduced or impaired
  No impact on the service
<event_group_name>The name of the event group this event falls into as seen in the event group setup. See section on setting up event groups.
<secret> The value of SECRET

The HTTP request can either be sent using a HTTP GET or POST request. Given the description section may be long, a HTTP POST is recommended


PHP Example

$fields = "secret=<secret>&service=<servicecode>&start=<start>&end=<end>&title=<title>
                &description=<description>&service_availability=3&event_group_name=For+Information";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://<serviceview_url>/event.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec ($ch);
curl_close ($ch);

PHP Example SSL Port 443

$fields = "secret=<secret>&service=<servicecode>&start=<start>&end=<end>&title=<title>
                &description=<description>&service_availability=3&event_group_name=For+Information";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://<serviceview_url>/event.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_PORT , 443); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec ($ch);
curl_close ($ch);

Equipment Discovery


Equipment discovery can be achievedby placing agents on the servers or desktops. Agents send HTTP(S) signals to the equipment.php API



http://<serviceview_url>/equipment.php?name=<name>&manufacturer=<manufacturer>&model=<model>&virtual=<virtual>&use=<use>&operating_system=<operating_system>&series_number=<serial_number>&asset_tag=<asset_tag>&service_code=<service_code>&data_center=<data_center>&rack=<rack>&rack_position=<rack_position>&secret=<secret>

Parameters are as follows:

<name>The name of the server or desktop. This must be unique.
<manufacturer>*The manufacturer of the server or desktop.
<model>*The model of the server or desktop
<virtual>*Is the equipment virtual? Value can be: V for virtual or P for physical.
<use>*Equipment use. Free text. For instance 'Production web server'.
<operating_system>*The operating system of thre equipment, i.e. RHEL6
<serial_number>*The serial number of the server or desktop.
<asset_tag>*The asset tag of the server or desktop.
<servicecode>*The unique code associated with each service entered from the add or edit service dialog. See adding services section.
<data_center>*The data center the equipment is in.
<rack>*Rack name the equipment is in.
<rack_position>*Position in rack (must be a number).
<secret>The value of the SECRET.

* Optional parameter



The HTTP request can either be sent using a HTTP GET or POST request.

PHP Example

$fields ="name=<name>&manufacturer=<manufacturer>&model=<model>&virtual=<virtual>&use=<use>&operating_system=<operating_system>&series_number=<serial_number>&asset_tag=<asset_tag>&service_code=<service_code>&data_center=<data_center>&rack=<rack>&rack_position=<rack_position>&secret=<secret>";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://<serviceview_url>/equipment.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec ($ch);
curl_close ($ch);


PHP Example SSL Port 443

$ fields ="name=<name>&manufacturer=<manufacturer>&model=<model>&virtual=<virtual>&use=<use>
&operating_system=<operating_system>&series_number=<serial_number>&asset_tag=<asset_tag>&service_code=<service_code>&data_center=<data_center>&rack=<rack>&rack_position=<rack_position>&secret=<secret>";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://<serviceview_url>/equipment.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_PORT , 443); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec ($ch);
curl_close ($ch);

Importing & Exporting Services & Equipment


In order to synchronise services and equipment between different systems it may be useful to use this set of APIs.



Servies in ServiceView fall into many categories, some of which would include equipment and some wouldn't.

Get Services


API to retrieve a list of all services or a subset dependent of search criteria passed to it.

http://<serviceview_url>/get_services.php?service_code=<service_code>&property_code =<property_code>&full=1&equipment=1&secret=<secret>

Parameters are as follows:

<service_code>*Only retrieve data on the one service matchin this service code.
<property_code>*Only retrieve data on the services with this property.
<full>*Include full details in return, if not specified just the service name and code a returned.
<equipment>*Include equipement details in return.
<secet>*The value of the SECRET.

* Optional parameter


Return Data

A JSON encoded array is returned:

If <full> is not specified the following fields are returned

service_codeInternal service reference
service_nameService name
service_group_nameName of service group


If <full> is specified the following fields are returned

service_codeInternal service reference
service_nameService name
service_group_nameName of service group



PHP Example

$fields = "secret=<secret>&service=<servicecode>&start=<start>&end=<end>&title=<title>
                &description=<description>&servicevavailability=3&event_group_name=For+Information";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://<serviceview_url>/event.php");
curl_setopt($ch, CURLOPT_POST, 1);
curlvsetopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec ($ch);
curl_close ($ch);

Service Status Website Integration


Calendar events also known as service status events can be exported from the ServiceView system to use on a service status website.



The following APIs are available:



Get current, future and past event descriptions

The main feed for the service status website, returns upcoming service events as well as current and recent ones.

http://<serviceview_url>/index.php?AP=service_ap&ACT=ajax_get_events

Parameters are as follows:

<service_id>*Specify the ID of the service. Omitting this parameter will return eents for all services.
<public_fg>*Set to yes to only show public events.
<from_dt>*Date to show events from, format YYYY-MM-DD
<show_after_date>*If set to yes events after <from_dt> will be returned, otherwise events up to <from_dt> will be returned.
<dt>*Only show events on this date, format YYYY-MM-DD
<page>*The events can be paginated using the <page> and <num_per_page> parameters, otherwise 100 events are returned if not specified.
<num_per_page>*Number of events to return in each page. See <page>
<secret>The value of the SECRET.

* Optional Paramter

The HTTP request can either be sent using a HTTP GET or POST request.


Return Data

Data is returned JSON encoded in a format suitable for the Datatabales jQuery plugin but can be used for other purposes:

sEchoUsed internally by Datatables
iTotalRecordUsed internally by Datatables
iTotalDisplayRecordsUsed internally by Datatables
aaData The returned data with the following fields:
 event_idID of event used when subscribing to events.
 service_nameService name
 descriptionEvent description
 service_availability_cdCode indicating whether service was available during the event:
 Service NOT available during period
 Reduced service delivery during period
 No impact on service during period
 event_group_idInternal reference to type of event: Unscheduled Outage, Unscheduled Service Reduction, Scheduled Service Maintenance, Scheduled Service Outage, For Information
 start_dtDate & time event started
 end_dtDate & time event finished
 service_idInternal reference of affcted service
 event_status_idCurrent status of event: Open event, Resolved event
 event_nameEvent title
 public_fgIf event public or internal only, set to yes for public
 event_group_nameType of event



Get Service Availability Status

API to display the current status of each service for use with service status LEDs

http://<serviceview_url>/index.php?AP=service_ap&ACT= ajax_list_public_service_status

Parameters are as follows:

<future_hours>The number represents the number of hours to look ahead by for reporting showing future planned outages for services.
<secret>The value of the SECRET.


Return Data

service_group_idThe returned data with the following fields:
service_idID of the service.
service_nameService name.
service_group_nameService category or group name.
service_descriptionDescription of service.
statusCurrent status containing:
 colorColor for LED light
 Red - outage
 Orange - Service reduction
 Yellow - Upcoming outage
 Green - Service okay
 commentComment for status. i.e. Outage in 5 hours.
 event_idThe even_id causing the non green status.
 event_nameThe name of the event.



Get Event Details and Updates

http://<serviceview_url>/index.php?AP=service_ap&ACT=ajax_get_event

Parameters are as follows:

<event_id>ID of the event. This paramter is returned from the step 1 API.
<public_fg>Set to yes to only show public events.
<secret>The value of the SECRET.

The HTTP request can either be sent using HTTP GET or POST request.

Return Data

event_detailsThe returned data with the following fields:
 event_idID of event used when subscribing to events.
 service_idService ID.
 event_status_idCurrent status of event: Open event, Resolved event.
 Service_nameService name.
 descriptionEvent description.
service_availability_cdCode indicating whether service was available during the event:
 Service NOT available during period.
 Reduced service delivery during period.
 No impact on service during period.
 service_availabilityTextual representation of above code.
 event_group_idInternal reference to type of event.
 event_group_nameType of event.
 start_dtDate & time event started.
 end_dtDate & time event finished.
 event_nameTitle or name of event.
 event_status_idEvent title.
 public_fgIf event public or internal only, set to yes for public type of event.
event_annotationsMultiple fields containing upfates and the event resolution.
 event_annotation_idUnique ID for this annotation.
 event_idEvent ID.
 status_cdStatus of this annotation (Resolution or Update).
 person_idInternal reference to the engineer who made the update.
 visibility_cdShould the annotation be Public or Internal only.
 resolution_fgSet to Y in this annotation as the event resolution.
 annotation_dtDate & time of annotation.
 annotationText of annotation.



Subscribe to Service Event

http://<serviceview_url>/index.php?AP=event_ap&ACT= subscribe_to_event

Parameters are as follows:

<event_id>ID of the event. This parameter is returned from the step 1 API.
<name>Name of person to subscribe to event.
<username>Username of person to subscribe to event.
<email>Email of person to subscribe to event.
<mobile>Mobile number of person to subscribe to event.
<alert>Alert type, either ,email, or ,sms,
<secret>The value of the SECRET.

The HTTP request can either be sent using a HTTP GET or POST request.


Return JSON encode:

<error>0 for success, 1 for failure.
<error_text>Error text.
<subscribed>Contains, Already Subscribed, if person is already subscribed to event.



Is Subscribed to Service Event

http://<serviceview_url>/index.php?AP=event_ap&ACT=is_subscribe_to_event

Parameters are as follows:

<event_id>ID of the event. This parameter is returned from the step 1 API.
<name>Name of person ot subscribe to event.
<username>Username of person to subscribe to event.
<secret>The value of the SECRET.

The HTTP request can either be sent using HTTP GET or POST request


Return JSON encode:

Get Service Availability Over a Period


http://<serviceview_url>/index.php?AP=service_ap&ACT= ajax_get_service_availability_period

Parameters are as follows:

<error>0 for success, 1 for failure.
<error_text>Error text.
<subscribed>Contains: Yes, if person is already subscribed to event, otherwise ,No.
<service_id> or <service>Specify the ID of the service using <service_id> or if that is not set use the service code specified in <service>.
<start_dt>*Date to show events from, format YYYY-MM-DD.
<end_dt>*Date to show events from, format YYYY-MM-DD.
<secret>The value of the SECRET.

The HTTP request can either be sent using a HTTP GET or POST request


Return Data

Data is returned JSON encoded in the following format:

service_idID of service.
start_dtPeriod start date passed into API.
end_dtPeriod end date passed into API.
period_secsTotal number of seconds in period.
total_outage_secsTotal number of seconds service was nor available in the period, includes scheduled and unscheduled outages.
total_available_percentPercentage service was available in period, includes scheduled and unscheduled outages.
available_percent_not_including_scheduled_outagesPercentage service was available in period, not including scheduled maintenance.
scheduled_outage_secsSeconds in period service was down for scheduled maintenance.
scheduled_eventsSee all scheduled events.
unscheduled_outage_secsSeconds in period service was down due to unscheduled outages.
unscheduled_eventsSee all unscheduled events.
all_events[] 
event_idID of event used when subscribing to events.
service_nameService name.
descriptionEvent description.
service_availability_cdCode indicating whether service was available during the event:
 Service NOT available during period.
 Reduced service delivery during period.
 No impact on service during period.
event_group_idInternal reference to type of event:
 Unscheduled Outage.
 Unscheduled Service Reduction.
 Scheduled Service Maintenance.
 Scheduled Service Outage.
 For information.
start_dtDate & time event started.
end_dtDate & time event finished.
service_idInternal reference of affected service.
nameEvent title.
public_fgIf event public or internal only, set to yes for public.
event_typeType of event.

Active Directory / LDAP Lookup


ServiceView can be configured to look up unknown people in Active Directory or LDAP.

Administrators need to configure the following options:

LDAP_PERSON_SEARCH_FILTER(&(&(cn=*%TERM%*)(employeetype=staff))(ou=*))
LDAP_PERSON_SEARCH_MIN_CHARS6 - Number of characters typed before lookup is performed
LDAP_PERSON_SEARCH_NAME_ATTRIBUTEcn
LDAP_TYPELDAP or AD
LDAP_HOST<ldap host>
LDAP_PERSON_SEARCH_DEPARTMENT_ATTRIBUTEou
LDAP_BASE_DN<base dn>
LDAP_PERSON_SEARCH_REF_ATTRIBUTEuid
LDAP_AUTH_USER<ldap connect username>
LDAP_AUTH_PASSWORD<ldap connect password>
LDAP_LOOKUP_UNKNOWN_PEOPLEYes or No

Spreadsheet Export & Import


Administrators can make the job of populating the ServiceView system much simpler using an Excel export and import process.

Under the Setup menu click on Download Spreadsheet to take a copy of the ServieView setup and download in a multi tabbed spreadsheet.

The spreadsheet contains the following tabs:



Note: Greyed out columns contain internal references and should not be changed.



Services Tab

The service tab contains information about service, service group and service dependencies.

Service IDThe internal reference for this service. Do not make changes to this unless you know what you are doing. If you remove this the import process will create a new service.
GroupService Group of the service. Changing this value will creat a new service group in the import.
ServiceThe service name.
Budget OwnerThe person who owns the budget for this service.
Business OwnerThe business owner for this service.
Technical OwnerThe technical owner for this service.
DescriptionThe service description.
Service CodeThe unique code for this service used by agents.
Supported HoursFree text field of supported hours.
In Service CatalogueDoes service appear in the service catalogue? Possible values are: Yes or No.
Service DependenciesThe dependencies for this service using internal references. The formast is groups of 3 numbers separatede by the | symbol. The 3 numbers are separated by the : symbol. The first of these is the service ID of the required service. The second number is the dependency type, 1 for required service delivery, 2 for partial service delivery, 3 for service updates and 4 for administrative purposes. The third number represents the per cent cost to pass on to this service. Example: 203:1:0|137:1:10:



People Tab

The people tab contains informastion about teams and people.

NameName of team or person.
Start DateDate person started working in the organisation. This is only useful if in the current year and used to work out costs. Employees who have worked longer just need to have a start date before the current year.
End DateThe end date for this person if their employment is termination. Use 299-01-01 as the end date for poeple with no end date.
PositionThe position name of this person. Also known as grade.
Percent FTEIs the person full time or part time. Set to 100% for full time or the % FTW if part time. i.e. 20% for 1 day a week.
Budget HolderName of person who is budget holder for this team.
EmailEmail address of person.
MobileMobile phone number for person.
PhoneDesk phone for person.
UsernameThe persons username. Set if they can log in and have a "User" entry.
RolePrivileges of user.
Local PasswordAn encrypted version of the users password if they have entered a local password.
Works on/Team IDEither the internal reference for the team orthe services the person works on: Format service ID, Role ID and percentage



Positions Tab

The position tab contains a list of positions and their annual cost.

PositionPosition name.
Annual costCost to the organisation for that position.



Roles Tab

The roles tab contains a list of roles. A role is what work a person performs for a service. For instance database administration.

Role IDInternal role reference.
GroupGroup role is in, used for reporting. For instance Admin, Technical.
RoleRole name.



Metrics Tab

The metrics tab contains a list of metrics for all services.

Metric IDInternal role reference.
Service IDID of service the metric is for.
ServiceName and group of service.
Metric NameName of the metric (No spaces or special characters as must work as a URL parameter.
DescriptionDescription of whast the metric is measuring.
UnitsUnits metric is measuring. i.e. percent, number, gigabytes.
TargetSet if a target (KRP) is set against this metric.
OperatorOperator for target i.e. >=
Target AmountThe target value, i.e. 98.



Reports Tab

The reports tab contains a list of reports for all services.

NameName of user.
EmailEmail address.
UsernameUsername they can login using.
RoleRole they will have, i.e. administrator.
Local PasswordIf set the encrypted password for this user, blank defaults to LDAP.