Audience: IT Support Staff

When used: Adding new and/or existing customers to XML feeds.

As new customers subscribe and current customers change employee contacts there will be a need to add or change contacts who will receive the XML feeds. The following will be needed before adding or modifying customers XML feeds: account subid and email contact name.

  1. SSH to the primary server as ‘vwpoint’
  2. cd /raid/netwatch/html/data

    • For IPREV3: cd /extra/netwatch/html/data/

  3. Create a directory for the customer (if one does not already exist.)
    • mkdir <customer name> This directory will be where the files will be placed after the script runs.

  4. Then edit the dailyDataDump script:
    • vi /home/vwpoint/viewPoint/tmp/dailyDataDump.sh Using vi commands locate the subid within the shell script OR if the subid is non-existent then create a new entry as follows:

        [$Script Path] [-s SUBID] [-y date] [-e "EMAIL"]   
        cp [companyname][$FILEDATE].xml /raid/netwatch/html/data/companyname
      
        ${VIEWPOINT}/tmp/dataDumpXml -s 5509 -y $dataDate -e ""
        cp sprintmyaccount${fileDate}.xml /raid/netwatch/html/data/sprintimc
      
        Note: If the customer chooses to have the feed sent to them via email the format is:
      
        ${VIEWPOINT}/tmp/dataDumpXml -s 5509 -y $dataDate -e "brian.garrison@globalnetatch.com"
      
        Otherwise leave the email setting as: -e " "
  5. Add the new client to the XML archive script

    vi /home/vwpoint/viewPoint/bin/xmlCleanup.sh Toward the bottom of the script add the new client to the section indicated for client specific info. Use the following format to add a new client:

     archiver [client_name] [file_base_name] [path_to_client_dir]
     
     Example:
      Client: Global Netwatch
    
      Directory to hold Global Netwatch xml files: /raid/netwatch/html/data/globalnetwatch
    
      Name of client XML files: gnw20051027.xml
    
      For the above example you would add the following line to xmlCleanup.sh
    
        archiver Global_Netwatch gnw /raid/netwatch/html/data/globalnetwatch
    Formatting Notes:
     1. The values passed to archiver should be single names (no spaces) - ie. only 3 distinct space separated values
    
     2. The file base name must match exactly with the files created.
    
     3. Use a FULL PATH for the path to client directory (see example above)

XML NOTES:

  1. When the XML creation sript runs it will create the XML feed, copy it to the customers folder and if requested mail the zipped file to the customer specified.
  2. The XML creation sript runs daily at 2am as a CRON job and creates both a zipped file and a regular file in /home/vwpoint/viewPoint/tmp then copies the regular file to the customer directory. All files are removed from tmp once the cycle runs again.
  3. The path for customers to access their XML dump: www.globalnetwatch.com/data/[customerdirectory]

  4. XML files can be reran for individual customers by doing the following:
    • ${VIEWPOINT}/tmp/dataDumpXml -s [subid] -y 20031015  -e "customer@company.com"

  5. When the XML cleanup script runs it will tar and zip the old XML files and copy them to an archive directory. The XML archive script runs on the second of the month and will send a notification email to maint@globalnetwatch.com

Adding Customers to XML Data Feeds (last edited 2007-02-13 16:38:51 by Eric)